/* Base Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

.container {
    width: 100%; /* Set to 100% for mobile */
    max-width: 480px; /* Max width for a phone */
    margin: 0 auto;
    padding: 10px;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

h1 {
    font-size: 20px; /* Slightly smaller for mobile */
    margin-bottom: 15px;
    text-align: center; /* Center-align for a better mobile experience */
}

form {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px; /* Smaller font size */
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px; /* Ensure it's touch-friendly */
}

button {
    width: 100%; /* Full width button for mobile */
    padding: 12px 20px; /* Increase padding for better touchability */
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px; /* Increase font size for readability */
}

button:hover {
    background-color: #0056b3;
}

.table-responsive {
    overflow-x: auto;
}

.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; /* Smaller table font for mobile */
}

.data th, .data td {
    border: 1px solid #ddd;
    padding: 8px;
}

.data th {
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: #007bff;
    color: white;
}

#videoPanel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 10px;
    display: none;
}

#videoFrame {
    width: 100%; /* Full width for mobile */
    height: auto; /* Auto height to maintain aspect ratio */
    margin: 0 auto;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
}

.close-button:hover {
    color: #f00;
}

#editPanel {
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    overflow: hidden;
    background-color: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    transition: width 0.3s;
    z-index: 1000;
    padding: 20px;
}

#editPanel.active {
    width: 100%; /* Full width when active on mobile */
    max-width: 400px; /* Limit the max width */
}

#closeEditPanel {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 20px;
    cursor: pointer;
}

/* Media Query for Smaller Screens (phones) */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 18px; /* Even smaller font for narrow screens */
    }

    input[type="text"], select {
        font-size: 14px; /* Adjust font size for small screens */
    }

    button {
        font-size: 14px; /* Adjust button text size */
        padding: 10px; /* Slightly reduce padding */
    }

    .data th, .data td {
        padding: 6px; /* Reduce padding in table cells */
        font-size: 12px; /* Adjust table font size */
    }
}
/* --- Custom Autocomplete Text Box Styling --- */
.autocomplete-items {
    position: absolute;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-radius: 0 0 5px 5px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 16px;
}

.autocomplete-items div:hover {
    background-color: #007bff;
    color: #ffffff;
}

/* Share Widget Container (The "Frame") */
.share-widget {
    display: inline-flex; /* inline-flex stops the container from taking the full 100% width of the page */
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background-color: #2a2836; /* A subtle dark background to act as the frame */
    padding: 8px 15px; /* Internal padding for the frame */
    border: 1px solid #4a4a4a; /* A clean border line */
    border-radius: 8px; /* Slightly rounded corners for the frame */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* A soft drop shadow to make it pop */
}

.share-label {
    font-weight: bold;
    color: #ffffff;
    font-size: 12px; /* Shrunk down to 12px */
    margin-right: 4px;
}

/* Base button styles with Flexbox for SVGs */
.share-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px !important;
    border-radius: 15px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
    width: auto !important;
    line-height: 1;
    margin: 0 !important;

    /* --> NEW: Mobile Resets <-- */
    -webkit-appearance: none !important; /* Stops iOS from applying bulky default button shapes */
    appearance: none !important;
    -webkit-text-size-adjust: 100% !important; /* Stops mobile browsers from inflating the font */
    touch-action: manipulation; /* Optimizes tap delay on phones */
}

/* Size and color the SVG icons */
.share-btn svg {
    width: 14px !important; /* Added !important to block mobile stylesheets */
    height: 14px !important; /* Added !important */
    flex-shrink: 0 !important; /* Prevents the icon from stretching or squishing on narrow phone screens */
    fill: currentColor;
    display: block !important;
}

.share-btn:hover {
    opacity: 0.85;
}

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

/* Platform-specific background colors */
.whatsapp { background-color: #25D366; }
.facebook { background-color: #1877F2; }
.twitter { background-color: #000000; border: 1px solid #444; }
.copy-link { background-color: #6c757d; }

