/* Marisol Rezervasyon Chat Widget Stilleri */

/* Genel Reset ve Değişkenler */
:root {
    --marisol-primary: #3d6659;
    --marisol-primary-hover: #2d4f42;
    --marisol-secondary: #3d6659;
    --marisol-text-color: #FFFFFF;
    --marisol-header-text: #FFFFFF;
    --marisol-chat-bg: #FFFFFF;
    --marisol-form-input-bg: #f8f9fa;
    --marisol-form-input-border: #3d6659;
    --marisol-form-button: #3d6659;
    --marisol-form-button-text: #FFFFFF;
    --marisol-overlay: rgba(0, 0, 0, 0.5);
    --marisol-shadow: rgba(0, 0, 0, 0.2);
    --chat-width: 400px;
    --chat-height: 600px;
}

/* Widget Container */
#marisol-rezervasyon-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100003;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Rezervasyon Butonu */
.rezervasyon-button {
    position: relative;
    background: var(--marisol-primary);
    color: var(--marisol-text-color);
    border: none;
    border-radius: 30px;
    padding: 15px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 20px var(--marisol-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.rezervasyon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--marisol-shadow);
    background: var(--marisol-primary-hover);
}

.rezervasyon-button:active {
    transform: translateY(0);
}

/* Buton İkonları */
.rezervasyon-button svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.calendar-icon {
    display: block;
}

.close-icon {
    display: none;
    position: absolute;
    right: 20px;
}

.rezervasyon-button.active .calendar-icon {
    display: none;
}

.rezervasyon-button.active .close-icon {
    display: block;
    animation: rotateIn 0.3s ease;
}

/* Buton Animasyonları */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px var(--marisol-shadow), 0 0 0 0 #394040;
    }
    70% {
        box-shadow: 0 4px 20px var(--marisol-shadow), 0 0 0 15px rgba(212, 165, 116, 0);
    }
    100% {
        box-shadow: 0 4px 20px var(--marisol-shadow), 0 0 0 0 rgba(212, 165, 116, 0);
    }
}

.rezervasyon-button {
    animation: pulse 2s infinite;
}

.rezervasyon-button:hover {
    animation: none;
}

/* Chat Penceresi */
.chat-window {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 33vw;
    height: 80vh;
    max-height: 600px;
    background: var(--marisol-chat-bg);
    border-radius: 16px;
    box-shadow: 0 10px 40px var(--marisol-shadow);
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100002;
}

/* Çok yüksek ekranlar için (1440px ve üzeri) */
@media (min-height: 900px) {
    .chat-window {
        height: 70vh;
        max-height: 800px;
    }
}

/* Ultra yüksek ekranlar için (1600px ve üzeri) */
@media (min-height: 1200px) {
    .chat-window {
        height: 60vh;
        max-height: 900px;
    }
}

/* Tablet için */
@media (max-width: 1024px) {
    .chat-window {
        width: 50vw;
    }
}

/* Mobil için */
@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}

.chat-window.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    visibility: visible;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, var(--marisol-secondary) 0%, var(--marisol-primary-hover) 100%);
    color: var(--marisol-header-text);
    padding: 20px;
    position: relative;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF !important;
}

.chat-header p {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Header Butonları */
.header-buttons {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
}

.header-btn {
    background: transparent;
    border: none;
    color: var(--marisol-white);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-btn svg {
    width: 20px;
    height: 20px;
}

/* Chat İçeriği */
.chat-content {
    flex: 1;
    position: relative;
    background: #f8f9fa;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 400px;
    max-height: calc(100vh - 200px);
}

/* Yükleniyor Animasyonu */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--marisol-primary);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    margin: 0;
    color: var(--marisol-text);
    font-size: 14px;
}

/* iFrame */
#rezervasyon-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
}

#rezervasyon-iframe.loaded {
    display: block;
}

/* Responsive Tasarım - Eski kod kaldırıldı çünkü yukarıda tanımlandı */

/* Animasyonlar */
@keyframes rotateIn {
    from {
        transform: rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: rotate(0deg);
        opacity: 1;
    }
}

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

/* Gölge Efektleri */
.rezervasyon-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.rezervasyon-button:hover::before {
    transform: translateX(100%);
}

/* Tooltip */
.rezervasyon-button::after {
    content: 'Online Rezervasyon';
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--marisol-secondary);
    color: var(--marisol-white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s;
}

.rezervasyon-button:hover::after {
    opacity: 1;
    transform: translateY(-10px);
}

/* Özel Scrollbar */
.chat-content::-webkit-scrollbar {
    width: 6px;
}

.chat-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-content::-webkit-scrollbar-thumb {
    background: var(--marisol-primary);
    border-radius: 3px;
}

.chat-content::-webkit-scrollbar-thumb:hover {
    background: var(--marisol-primary-dark);
}

/* Pozisyon Sınıfları */
#marisol-rezervasyon-widget.position-bottom-left {
    left: 20px;
    right: auto;
}

#marisol-rezervasyon-widget.position-bottom-left .chat-window {
    left: 0;
    right: auto;
}

#marisol-rezervasyon-widget.position-top-right {
    top: 20px;
    bottom: auto;
}

#marisol-rezervasyon-widget.position-top-right .chat-window {
    top: 80px;
    bottom: auto;
}

#marisol-rezervasyon-widget.position-top-left {
    top: 20px;
    bottom: auto;
    left: 20px;
    right: auto;
}

#marisol-rezervasyon-widget.position-top-left .chat-window {
    top: 80px;
    bottom: auto;
    left: 0;
    right: auto;
}

/* Nabız animasyonu kontrolü */
.rezervasyon-button:not(.has-pulse) {
    animation: none !important;
}

/* Arkaplan Overlay */
.rezervasyon-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--marisol-overlay);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100000;
}

.rezervasyon-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Devam Et Uyarısı */
.resume-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: var(--marisol-primary);
    color: var(--marisol-white);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    gap: 15px;
    z-index: 100003;
    animation: slideInRight 0.3s ease;
}

.resume-notification.show {
    display: flex;
}

.resume-notification button {
    background: var(--marisol-white);
    color: var(--marisol-primary);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.resume-notification button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Rezervasyon Form Stilleri */
.rezervasyon-form {
    padding: 20px;
    background: white;
    position: relative;
    z-index: 2;
}

.form-section {
    margin-bottom: 25px;
}

.form-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--marisol-secondary);
}

/* Tarih Inputları */
.date-inputs {
    display: flex;
    gap: 15px;
}

.date-input-group {
    flex: 1;
}

.date-input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--marisol-text);
    font-weight: 500;
}

.date-input {
    width: 100%;
    padding: 12px;
    background: var(--marisol-form-input-bg);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.date-input:hover {
    background: var(--marisol-form-input-bg-hover, #f0f1f3);
}

.date-input:focus {
    outline: none;
    background: var(--marisol-form-input-bg-hover, #f0f1f3);
    box-shadow: 0 0 0 3px rgba(61, 102, 89, 0.1);
}

/* Misafir Kontrolleri */
.guest-controls {
    background: var(--marisol-form-input-bg);
    border-radius: 8px;
    padding: 15px;
}

.guest-control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.guest-control-row:not(:last-child) {
    border-bottom: none !important;
}

.guest-info {
    flex: 1;
}

.guest-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--marisol-text);
    margin-bottom: 3px;
}

.guest-desc {
    display: block;
    font-size: 13px;
    color: #666;
}

.guest-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none !important;
    outline: none !important;
}

.counter-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--marisol-form-input-bg);
    color: var(--marisol-form-input-border);
    border-radius: 50%;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.counter-btn:hover {
    background: var(--marisol-primary);
    color: var(--marisol-text-color);
    transform: scale(1.1);
}

.counter-btn:active {
    transform: scale(0.95);
}

.counter-btn.minus:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.counter-btn.minus:disabled:hover {
    background: var(--marisol-white);
    color: var(--marisol-primary);
    transform: scale(1);
}

.counter-value {
    min-width: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--marisol-text);
}

/* Arama Butonu */
.search-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--marisol-form-button) 0%, var(--marisol-primary-hover) 100%);
    color: var(--marisol-form-button-text);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 102, 89, 0.3);
}

.search-button:active {
    transform: translateY(0);
}

.search-button svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.search-button:hover svg {
    transform: translateX(3px);
}

/* iframe stilleri */
#rezervasyon-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: white;
    border: none;
    z-index: 5;
}

/* iframe görünür olduğunda */
#rezervasyon-iframe[style*="display: block"] {
    display: block !important;
}

/* iframe içindeki gereksiz alanları gizle */
.chat-window iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* iframe yüklenirken arka plan */
#rezervasyon-iframe.loading {
    background: #f8f9fa url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20" fill="none" stroke="%233d6659" stroke-width="3" stroke-linecap="round" stroke-dasharray="31.415, 31.415" transform="rotate(0, 25, 25)"><animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite"/></circle></svg>') center center no-repeat;
    background-size: 50px 50px;
}

/* iframe yüklendiğinde içerik gizleme */
.iframe-style-inject {
    display: none;
}

/* Border temizleme için global kurallar */
.guest-counter,
.guest-counter *,
.guest-control-row,
.guest-control-row * {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Responsive Form Düzeni */
@media (max-width: 480px) {
    /* Chat widget genel ayarları */
    .chat-widget {
        width: 95% !important;
        max-width: 350px !important;
        right: 2.5% !important;
        left: 2.5% !important;
        bottom: 70px !important;
    }
    
    .chat-body {
        padding: 15px !important;
    }
    .date-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .date-input {
        padding: 10px;
        font-size: 14px;
    }
    
    .guest-controls {
        display: flex;
        flex-direction: row;
        gap: 20px;
        justify-content: space-between;
    }
    
    .guest-control-row {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .guest-info {
        font-size: 14px;
        text-align: center;
    }
    
    .guest-counter {
        justify-content: center;
    }
    
    .counter-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .counter-value {
        font-size: 16px;
        min-width: 20px;
    }
    
    .guest-counter {
        gap: 5px !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
    
    /* Rezervasyon butonu için */
    .submit-btn {
        margin-top: 15px;
    }
}