/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fdf6f6;
    background-image: url('Home.png');
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.language-button {
    background-color: rgba(255, 255, 255, 0.7);
    color: #333;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s;
    font-family: 'Fraunces', serif;
}

.language-button:hover, .language-button.active {
    background-color: #d4a6e3;
    color: white;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 5px;
}

h2 {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
    letter-spacing: 2px;
}

/* Floral Card Container */
.floral-card {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 80px; /* This padding creates space for the floral frame */
}

/* This creates the floral frame using a pseudo-element */
.floral-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('IMG_4948.png'); /* Your floral frame image */
    background-size: 100% 120%; /* This stretches the image to fill the container */
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none; /* This allows clicks to pass through to elements below */
    z-index: 1; /* Places the frame above the background but below the content */
}

.card-content {
    /* This styles the inner white content area */
    position: relative;
    background-color: rgba(255, 255, 255, 1); 
    padding: 30px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px;
}

.floral-card h3 {
    /* This styles the "FIND YOUR TABLE" heading */
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
    letter-spacing: 3px;
    font-weight: 500;
    text-align: center;
}

/* Divider with Heart */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.divider-line {
    height: 1px;
    width: 100px;
    background-color: #e0c8ae;
    display: inline-block;
}

.heart-icon {
    display: inline-block;
    margin: 0 15px;
    color: #e0c8ae;
    font-size: 1.2rem;
}

.simple-divider {
    height: 1px;
    background-color: #e0c8ae;
    margin: 25px 0;
}

/* Search Container */
.search-container {
    margin: 30px 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    background-color: #f2f2f2;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Lato', sans-serif;
    text-align: center;
    letter-spacing: 1px;
}

button {
    background-color: #c896e0;
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 5px;
    transition: background-color 0.3s;
    font-family: 'Lato', sans-serif;
    letter-spacing: 1px;
    width: 100%;
}

button:hover {
    background-color: #b57ad1;
}
/* Side Selector */
.side-selector {
    margin: 15px 0;
    text-align: center;
}

.side-selector p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.radio-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 12px 0;
}

/* Basic Radio Button Styling */
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.8);
}

.radio-label:hover {
    background-color: rgba(255, 255, 255, 0.95);
}

.radio-label input {
    margin-right: 8px;
}

/* Result Container */
.result-container, .no-result {
    margin: 40px 0;
    width: 100%;
    max-width: 700px;
}

.retry-button {
    background-color: #c896e0;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: background-color 0.3s;
    font-family: 'Lato', sans-serif;
    letter-spacing: 1px;
    display: block;
    margin: 10px auto;
}

.retry-button:hover {
    background-color: #b57ad1;
}

/* Make the error message more visible */
.error-message {
    margin-top: 20px;
    padding: 15px;
    background-color: #ffeeee;
    border: 2px solid #ffcaca;
}

.result-card {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.result-card h3 {
    font-size: 1.8rem;
    color: #9e7b5e;
    margin-bottom: 15px;
    text-align: center;
}

.result-card p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-align: center;
}

.tablemates h4, .map-container h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #666;
    text-align: center;
}

.tablemates ul {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tablemates li {
    background-color: #f5f1ed;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
}

/* Venue Map */
.venue-map {
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 15px;
    position: relative;
    overflow: auto;
    background-color: #faf8f5;
    margin-bottom: 25px;
}

.table {
    position: absolute;
    border-radius: 50%;
    border: 2px solid #c896e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    background-color: #fff;
    transition: all 0.3s;
    font-size: 0.8rem;
    text-align: center;
}

.fixed-element {
    position: absolute;
    background-color: #f8f3fb;
    border: 1px solid #dccce9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #7a6d81;
    text-align: center;
}

/* Improved Table Highlighting */

/* Make table highlight more prominent */
.table.highlighted {
    border-color: #c896e0;
    background-color: #c896e0;
    color: white;
    box-shadow: 0 0 20px rgba(200, 150, 224, 0.8);
    transform: scale(1.2);
    z-index: 100;
    /* Add animation */
    animation: pulse 1.5s infinite alternate;
}

/* Pulse animation for highlighted table */
@keyframes pulse {
    from {
        box-shadow: 0 0 15px rgba(200, 150, 224, 0.7);
    }
    to {
        box-shadow: 0 0 25px rgba(200, 150, 224, 1);
    }
}

/* Improve venue map display */
.venue-map {
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 15px;
    position: relative;
    overflow: auto;
    background-color: #faf8f5;
    margin-bottom: 25px;
    /* Critical fix: ensure the map is visible */
    display: block !important;
    visibility: visible !important;
}

/* Improve table styling */
.table {
    position: absolute;
    border-radius: 50%;
    border: 2px solid #c896e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    background-color: #fff;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Ensure tables are visible and clickable */
    z-index: 10;
    cursor: pointer;
}

/* Flash animation for newly loaded tables */
@keyframes flash {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.table-new {
    animation: flash 0.5s;
}

/* Improve fixed element styling */
.fixed-element {
    position: absolute;
    background-color: #f8f3fb;
    border: 1px solid #dccce9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #7a6d81;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Better z-index handling */
    z-index: 5;
}

/* Utility Classes */
.hidden {
    display: none;
}

.no-result p {
    text-align: center;
    font-size: 1.2rem;
    color: #c75050;
    margin-bottom: 20px;
}

.error-message {
    text-align: center;
    font-size: 1.2rem;
    color: #c75050;
    margin: 20px 0;
    padding: 10px;
    background-color: #ffeaea;
    border: 1px solid #ffcaca;
    border-radius: 10px;
    max-width: 700px;
    margin: 0 auto;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin-top: 60px;
    }
    
    h1 {
        font-size: 2rem;
        letter-spacing: 3px;
    }
    
    h2 {
        font-size: 0.9rem;
    }

    .floral-card {
        padding: 20px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .language-selector {
        top: 10px;
        right: 10px;
    }
    
    .language-button {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .venue-map {
        height: 400px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    
    .floral-card h3 {
        font-size: 1.5rem;
    }
    
    .divider-line {
        width: 70px;
    }
}
/* Improved Venue Map Styling */
.venue-map {
    height: 600px; /* Increased height to better display all tables */
    border: 1px solid #ddd;
    border-radius: 15px;
    position: relative;
    overflow: auto;
    background-color: #faf8f5;
    margin-bottom: 25px;
    /* Critical fix: ensure the map is visible */
    display: block !important;
    visibility: visible !important;
    min-height: 400px;
}

/* Table styling improvements */
.table {
    position: absolute;
    border-radius: 50%;
    border: 2px solid #c896e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    background-color: #fff;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    /* Add minimum dimensions */
    min-width: 40px;
    min-height: 40px;
    /* Add shadow for better visibility */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Ensure text doesn't overflow */
    overflow: hidden;
    padding: 2px;
}

/* Fixed element styling improvements */
.fixed-element {
    position: absolute;
    background-color: #f8f3fb;
    border: 1px solid #dccce9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #7a6d81;
    text-align: center;
    /* Add shadow for better visibility */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Improve text handling */
    overflow: hidden;
    padding: 5px;
    /* Better z-index handling */
    z-index: 5;
}

/* Improved highlight styling */
.highlighted {
    border-color: #c896e0;
    background-color: #c896e0;
    color: white;
    box-shadow: 0 0 15px rgba(200, 150, 224, 0.6);
    transform: scale(1.1);
    z-index: 10;
    /* Add animation */
    animation: pulse 1.5s infinite alternate;
}

/* Pulse animation for highlighted table */
@keyframes pulse {
    from {
        box-shadow: 0 0 10px rgba(200, 150, 224, 0.6);
    }
    to {
        box-shadow: 0 0 20px rgba(200, 150, 224, 0.9);
    }
}

/* Fix for empty map message */
.empty-map-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
    color: #888;
    font-style: italic;
}
/* Table Modal Styles */
.table-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: 400px;
    width: 90%;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 25px;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
}

#tableModalBackdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Table styles - improved for clickability */
.table {
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.table:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(200, 150, 224, 0.6);
}

/* Table hint text */
.table-tip {
    text-align: center;
    font-style: italic;
    color: #888;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Animation for modal */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.table-modal {
    animation: fadeIn 0.3s ease-out;
}

/* Guest list in modal */
.table-modal ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.table-modal li {
    background-color: #f5f1ed;
    padding: 8px 15px;
    border-radius: 20px;
    min-width: 150px;
    text-align: center;
}

/* Improved hover effect for better touch feedback */
.table:active {
    transform: scale(0.95);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-modal {
        max-width: 350px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .table-modal {
        max-width: 300px;
        padding: 15px;
    }
    
    .table-modal h3 {
        font-size: 1.5rem;
    }
}
/* Improved responsive design for venue map */
@media (max-width: 768px) {
    .venue-map {
        height: 500px;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .fixed-element {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .venue-map {
        height: 400px;
    }
    
    .table {
        font-size: 0.7rem;
    }
}
