/**
 * GC Rádce Widget Styles
 * Geocaching.cz branding: #ef7f01 (oranžová) + #264f53 (tmavě zelená)
 */

/* === Widget Container === */
.gc-radce-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* === Floating Button - ČISTÝ === */
.gc-radce-button {
    position: relative;
    width: 64px;
    height: 64px;
    border: none;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.gc-radce-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.gc-radce-button:active {
    transform: scale(0.98);
}

.gc-radce-button img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}

/* Help indicator - JEN zelený otazník */
.gc-radce-button::after {
    content: "?";
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #264f53 0%, #1a3a3d 100%);
    color: white;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(38, 79, 83, 0.6);
    z-index: 2;
    transition: transform 0.3s ease;
}

.gc-radce-button:hover::after {
    transform: scale(1.15) rotate(15deg);
}

/* Pulzující efekt */

}

/* Badge pro notifikace */
.gc-radce-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 12px;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* === Chat Window === */
.gc-radce-chat {
    position: absolute;
    bottom: 84px;
    right: 0;
    width: 400px;
    height: 620px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === Header === */
.gc-radce-header {
    background: linear-gradient(135deg, #264f53 0%, #1a3a3d 100%);
    color: white;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gc-radce-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.gc-radce-header-title img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.gc-radce-header-title span {
    font-size: 18px;
    font-weight: 600;
}

.gc-radce-header-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.gc-radce-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gc-radce-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.gc-radce-close:active {
    background: rgba(255, 255, 255, 0.25);
}

/* === Messages Area === */
.gc-radce-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gc-radce-messages::-webkit-scrollbar {
    width: 6px;
}

.gc-radce-messages::-webkit-scrollbar-track {
    background: #e9ecef;
}

.gc-radce-messages::-webkit-scrollbar-thumb {
    background: #264f53;
    border-radius: 3px;
}

.gc-radce-messages::-webkit-scrollbar-thumb:hover {
    background: #1a3a3d;
}

/* === Message === */
.gc-radce-message {
    display: flex;
    gap: 10px;
    animation: messageIn 0.3s ease;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gc-radce-message-bot {
    align-self: flex-start;
}

.gc-radce-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.gc-radce-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
}

.gc-radce-message-bot .gc-radce-message-avatar {
    background: #ef7f01;
    color: white;
    box-shadow: 0 2px 6px rgba(239, 127, 1, 0.3);
}

.gc-radce-message-bot .gc-radce-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.gc-radce-message-user .gc-radce-message-avatar {
    background: #264f53;
    color: white;
    box-shadow: 0 2px 6px rgba(38, 79, 83, 0.3);
}

.gc-radce-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.gc-radce-message-bot .gc-radce-message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.gc-radce-message-user .gc-radce-message-content {
    background: #ef7f01;
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 6px rgba(239, 127, 1, 0.3);
}

.gc-radce-message-content p {
    margin: 0 0 8px 0;
}

.gc-radce-message-content p:last-child {
    margin-bottom: 0;
}

.gc-radce-message-content a {
    color: #ef7f01;
    text-decoration: underline;
    font-weight: 500;
}

.gc-radce-message-user .gc-radce-message-content a {
    color: white;
    text-decoration: underline;
}

/* === Suggestions === */
.gc-radce-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.gc-radce-suggestion {
    padding: 8px 14px;
    background: white;
    border: 2px solid #ef7f01;
    color: #ef7f01;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.gc-radce-suggestion:hover {
    background: #ef7f01;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 127, 1, 0.3);
}

.gc-radce-suggestion:active {
    transform: translateY(0);
}

/* === Input Area === */
.gc-radce-input-wrapper {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: center;
}

.gc-radce-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.gc-radce-input:focus {
    border-color: #ef7f01;
    box-shadow: 0 0 0 3px rgba(239, 127, 1, 0.1);
}

.gc-radce-send {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #ef7f01;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gc-radce-send:hover {
    background: #ff8f11;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 127, 1, 0.3);
}

.gc-radce-send:active {
    transform: scale(0.98);
}

.gc-radce-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* === Loading/Typing === */
.gc-radce-loading {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.gc-radce-typing {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.gc-radce-typing span {
    width: 8px;
    height: 8px;
    background: #264f53;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.gc-radce-typing span:nth-child(1) {
    animation-delay: 0s;
}

.gc-radce-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.gc-radce-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* === Mobile Responsive === */
@media (max-width: 480px) {
    .gc-radce-widget {
        bottom: 15px;
        right: 15px;
    }

    .gc-radce-button {
        width: 56px;
        height: 56px;
    }

    .gc-radce-button::after {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .gc-radce-chat {
        width: calc(100vw - 30px);
        height: calc(100vh - 100px);
        bottom: 75px;
        right: 15px;
    }

    .gc-radce-messages {
        padding: 16px;
    }

    .gc-radce-input-wrapper {
        padding: 12px 16px;
    }
}

/* === Animation utilities === */
.gc-radce-hidden {
    display: none !important;
}

.gc-radce-fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
