/**
 * Dr. Reinisch CTA - Frontend Styles
 * Colors: Primary #f9b233, Dark #1a1a1a, White #ffffff
 * Fonts: Giga Sans (headings & text)
 */

@import url('https://zahnarzt-reinisch.at/wp-content/themes/hello-elementor-child/fonts/giga-sans.css');

:root {
    --drc-primary: #f9b233;
    --drc-primary-dark: #e09e1a;
    --drc-shade: #f7f7f7;
    --drc-black: #1a1a1a;
    --drc-gray: #6b7280;
    --drc-gradient: linear-gradient(135deg, #f9b233 0%, #e09e1a 100%);
    --drc-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 10px 10px -5px rgba(0, 0, 0, 0.05);
    --drc-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.28);
}

/* Widget Container */
#drc-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    font-family: 'Giga Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    animation: drc-slideInUp 0.5s ease forwards;
}

/* Minimized State */
#drc-widget-minimized {
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: none;
    animation: drc-fadeIn 0.3s ease;
}

.drc-gradient-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--drc-black);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--drc-shadow-xl);
    transition: all 0.3s ease;
    position: relative;
}

.drc-gradient-circle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 30px 60px -12px rgba(249, 178, 51, 0.4);
}

/* Main Widget Button */
.drc-widget-button {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: var(--drc-shadow-xl);
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 340px;
    border: 2px solid transparent;
    overflow: visible;
}

.drc-widget-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: var(--drc-black);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.drc-widget-button:hover::before {
    opacity: 1;
}

.drc-widget-button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 30px 60px -12px rgba(249, 178, 51, 0.3);
}

/* Minimize Button */
.drc-minimize-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 28px;
    min-height: 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
    padding: 0;
    flex-shrink: 0;
    color: var(--drc-gray);
}

.drc-widget-button:hover .drc-minimize-btn {
    opacity: 1;
}

.drc-minimize-btn:hover {
    background: var(--drc-black);
    border-color: transparent;
    transform: rotate(90deg) scale(1.1);
    color: white;
}

.drc-minimize-btn svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Content Layout */
.drc-widget-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* Avatar */
.drc-avatar-group {
    position: relative;
    flex-shrink: 0;
}

.drc-widget-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    background: var(--drc-shade);
    display: block;
}

.drc-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 3px solid white;
    border-radius: 50%;
    animation: drc-pulse-dot 2s infinite;
}

/* Text Content */
.drc-widget-text {
    flex: 1;
}

.drc-widget-headline {
    font-family: 'Giga Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--drc-black);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.drc-widget-subheadline {
    font-size: 14px;
    color: var(--drc-gray);
    margin-bottom: 6px;
}

.drc-widget-response-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--drc-primary-dark);
    font-weight: 500;
}

/* CTA Button */
.drc-widget-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #1a1a1a !important;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.drc-widget-cta-text {
    color: #ffffff !important;
}

.drc-widget-cta:hover {
    background: var(--drc-primary);
}

.drc-widget-cta-text {
    font-size: 14px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

/* ====================== */
/* MODAL STYLES           */
/* ====================== */

.drc-widget-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
}

.drc-widget-modal.open {
    display: block;
    animation: drc-fadeIn 0.3s ease;
}

.drc-widget-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.drc-widget-modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--drc-shadow-xl);
    animation: drc-slideInScale 0.3s ease;
}

.drc-widget-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    color: var(--drc-gray);
}

.drc-widget-modal-close:hover {
    background: var(--drc-black);
    color: white;
    transform: rotate(90deg);
}

.drc-widget-modal-close svg {
    width: 24px;
    height: 24px;
}

.drc-widget-modal-header {
    padding: 40px 40px 24px;
    text-align: center;
    border-bottom: 2px solid var(--drc-shade);
    background: var(--drc-black);
    border-radius: 24px 24px 0 0;
}

.drc-modal-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(249, 178, 51, 0.4);
    border: 4px solid var(--drc-primary);
}

.drc-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drc-widget-modal-title {
    font-family: 'Giga Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    padding-top: 0;
    letter-spacing: -0.03em;
}

/* Response Time Pill in Modal */
.drc-modal-response-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--drc-black);
    font-weight: 600;
    background: var(--drc-primary);
    padding: 8px 14px;
    border-radius: 20px;
    margin-top: 12px;
}

.drc-modal-response-time svg {
    flex-shrink: 0;
}

.drc-widget-modal-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    line-height: 1.5;
}

.drc-widget-modal-content {
    padding: 32px 40px 40px;
}

/* ====================== */
/* FORM STYLES            */
/* ====================== */

.drc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drc-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.drc-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--drc-black);
}

.drc-form-group .required {
    color: #ef4444;
}

.drc-form-group input[type="text"],
.drc-form-group input[type="tel"],
.drc-form-group select,
.drc-form-group textarea {
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
    color: var(--drc-black);
    height: auto;
    line-height: 1.4;
}

.drc-form-group input:focus,
.drc-form-group select:focus,
.drc-form-group textarea:focus {
    outline: none;
    border-color: var(--drc-primary);
    box-shadow: 0 0 0 3px rgba(249, 178, 51, 0.15);
}

.drc-form-group input::placeholder,
.drc-form-group textarea::placeholder {
    color: #9ca3af;
}

.drc-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.drc-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Privacy Checkbox */
.drc-privacy label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    cursor: pointer;
}

.drc-privacy input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--drc-primary);
    cursor: pointer;
}

.drc-privacy a {
    color: var(--drc-primary-dark);
    text-decoration: underline;
}

.drc-privacy a:hover {
    color: var(--drc-black);
}

/* Service Pills */
.drc-service-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.drc-pill {
    cursor: pointer;
    display: block;
}

.drc-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.drc-pill span {
    display: inline-block;
    padding: 10px 16px;
    background: var(--drc-shade);
    border: 2px solid transparent;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    color: var(--drc-black);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.drc-pill:hover span {
    border-color: var(--drc-primary);
    background: white;
}

.drc-pill input:checked + span {
    background: var(--drc-black);
    color: white;
    border-color: var(--drc-black);
}

/* Notfall Info Box */
.drc-notfall-info {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fef3cd 0%, #fff8e6 100%);
    border: 1px solid #f0d78c;
    border-radius: 12px;
    animation: drc-fadeIn 0.3s ease;
}

.drc-notfall-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.drc-notfall-text {
    flex: 1;
}

.drc-notfall-text strong {
    display: block;
    font-size: 14px;
    color: #8a6d3b;
    margin-bottom: 6px;
}

.drc-notfall-text p {
    font-size: 13px;
    color: #6b563a;
    line-height: 1.5;
    margin: 0;
}

.drc-notfall-hint {
    margin-top: 8px !important;
    font-size: 12px !important;
    color: #8a6d3b !important;
    font-weight: 500;
}

/* Submit Button */
.drc-submit-btn {
    padding: 16px 24px !important;
    background: #1a1a1a !important;
    border: none !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    font-family: 'Giga Sans', sans-serif !important;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
}

.drc-submit-btn:hover {
    background: #f9b233 !important;
    color: #1a1a1a !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(249, 178, 51, 0.35);
}

.drc-submit-btn:active {
    transform: translateY(0);
}

.drc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.drc-submit-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.drc-spinner {
    animation: drc-spin 1s linear infinite;
}

/* Success Message */
.drc-success-message {
    text-align: center;
    padding: 20px 0;
}

.drc-success-icon {
    margin-bottom: 20px;
}

.drc-success-icon svg {
    animation: drc-checkmark 0.5s ease;
}

.drc-success-message h3 {
    font-family: 'Giga Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--drc-black);
    margin: 0 0 12px 0;
}

.drc-success-message p {
    font-size: 15px;
    color: var(--drc-gray);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.drc-close-success-btn {
    padding: 16px 24px !important;
    background: #1a1a1a !important;
    border: none !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    font-family: 'Giga Sans', sans-serif !important;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 8px;
}

.drc-close-success-btn:hover {
    background: #f9b233 !important;
    color: #1a1a1a !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(249, 178, 51, 0.35);
}

/* Error State */
.drc-form-group.error input,
.drc-form-group.error select,
.drc-form-group.error textarea {
    border-color: #ef4444;
}

.drc-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 16px;
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 16px;
}

/* ====================== */
/* ANIMATIONS             */
/* ====================== */

@keyframes drc-slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes drc-slideInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes drc-pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes drc-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes drc-checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ====================== */
/* RESPONSIVE             */
/* ====================== */

@media (max-width: 768px) {
    #drc-widget-container {
        bottom: 15px;
        right: 15px;
        left: 15px;
    }

    .drc-widget-button {
        min-width: unset;
        width: 100%;
        padding: 16px 20px;
    }

    .drc-minimize-btn {
        opacity: 1 !important;
    }

    .drc-widget-content {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }

    .drc-widget-avatar {
        width: 56px;
        height: 56px;
        border-width: 3px;
    }

    .drc-widget-headline {
        font-size: 16px;
    }

    .drc-widget-subheadline {
        font-size: 13px;
    }

    .drc-widget-response-time {
        justify-content: center;
    }

    .drc-widget-cta {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    /* Modal Mobile */
    .drc-widget-modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }

    .drc-widget-modal-header {
        padding: 24px 20px 20px;
        border-radius: 0;
    }

    .drc-widget-modal-title {
        font-size: 22px;
    }

    .drc-widget-modal-subtitle {
        font-size: 14px;
    }

    .drc-widget-modal-content {
        padding: 24px 20px 32px;
    }

    .drc-widget-modal-close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }

    .drc-modal-avatar {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 380px) {
    .drc-widget-button {
        padding: 12px 16px;
    }

    .drc-widget-headline {
        font-size: 14px;
    }

    .drc-widget-subheadline {
        display: none;
    }

    .drc-widget-cta {
        padding: 10px 16px;
    }

    .drc-widget-cta-text {
        font-size: 13px;
    }
}
