/* Checkin Africa admin styles */
* {
    box-sizing: border-box;
}

.checkin-africa-container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 15px 5px;
    background: #f9fafb;
}

.checkin-title {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
}

.checkin-card-section {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 20px;
    width: 100%;
}

@media (max-width: 1200px) {
    .checkin-card-section {
        flex-direction: column;
    }
}

.checkin-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
    min-width: 250px;
    flex: 1 1 calc(25% - 18.75px); /* Equal width with gap adjustment */
    transition: transform 0.3s;
    padding-bottom: 40px; /* Added for vertical centering */
}

.checkin-card:hover {
    transform: scale(1.02);
}

.checkin-card span.dashicons {
    font-size: 36px;
    color: #072e75;
    margin-bottom: 10px;
    display: block;
}

.checkin-card h3 {
    font-size: 16px;
    color: #2c3e50;
    margin: 10px 0;
    margin-top: -20px; /* Align labels with icons */
}

.checkin-stat {
    font-size: 48px;
    font-weight: bold;
    color: #22c58e;
    display: block;
}

.checkin-nav-links {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.checkin-nav-button {
    background: #22c58e;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.3s;
}

.checkin-nav-button:hover {
    background: #1aa873;
}

.checkin-africa-container .checkin-create-button {
    background: #22c58e;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    margin: 0 0 20px 0;
    float: left; /* Changed to float left */
    height: auto; /* Override WordPress height */
    line-height: normal; /* Override WordPress line-height */
    min-height: 0; /* Override WordPress min-height */
    transition: background 0.3s;
}

.checkin-africa-container .checkin-create-button:hover {
    background: #1aa873;
}

.checkin-side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .checkin-side-by-side {
        grid-template-columns: 1fr;
    }
}

.checkin-form-card,
.checkin-upload-card {
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1; /* Ensure it takes full height in flex context */
}

.checkin-form-card {
    min-height: 250px; /* Match height with upload card */
}

.checkin-upload-card {
    min-height: 250px; /* Match height with upload card */
}

.checkin-form-card h3,
.checkin-upload-card h3 {
    padding-top: 15px; /* Add top padding to section headings */
    margin-bottom: 20px; /* Add space between heading and input */
}

.checkin-form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.checkin-form-group {
    margin-bottom: 0;
}

.checkin-form-group label {
    display: block;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.checkin-form-group input,
.checkin-form-group select {
    width: 100%;
    padding: 8px 12px; /* Wider padding for bigger inputs */
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 60px; /* Increased for bigger height */
    font-size: 16px; /* Bigger font size */
}

.checkin-form-group input:focus,
.checkin-form-group select:focus {
    outline: none;
    border-color: #22c58e; /* Brand green highlight */
    box-shadow: 0 0 0 3px rgba(34, 197, 142, 0.2); /* Green shadow for consistency */
}

.checkin-upload-card .checkin-form-group .checkin-file-input {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 175px; /* Fixed height to match remaining space and stretch border */
    padding: 70px 180px; /* Padding to center file selector, adjusted for balance on desktop */
    font-size: 14px;
    font-weight: 600;
    border: 2px dashed #22c58e; /* Dashed green border */
    border-radius: 12px;
    background-color: #f8fffb; /* Light green background */
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto; /* Center the field horizontally */
    text-align: center;
    max-width: 100%; /* Ensure it doesn’t exceed container */
    box-sizing: border-box; /* Include padding in width calculation */
}

@media (max-width: 1024px) and (min-width: 769px) {
    .checkin-upload-card .checkin-form-group .checkin-file-input {
        padding: 40px 80px; /* Adjusted padding for tablet */
    }
}

@media (max-width: 768px) {
    .checkin-upload-card .checkin-form-group .checkin-file-input {
        height: auto; /* Allow natural height on mobile */
        padding: 20px 40px; /* Reduced padding for mobile */
        min-height: 150px; /* Minimum height for mobile */
    }
    .checkin-upload-card {
        min-height: 200px; /* Reduced min-height for mobile */
    }
}

.checkin-upload-card .checkin-form-group .checkin-file-input:hover {
    border-color: #1aa873; /* Darker green on hover */
    background-color: #e6fff5;
}

.checkin-upload-card .checkin-form-group .checkin-file-input:focus {
    outline: none;
    border-color: #22c58e;
    box-shadow: 0 0 0 3px rgba(34, 197, 142, 0.2); /* Match brand green */
}

.checkin-upload-card button[type="submit"] {
    margin-top: 20px; /* Align with Add Guest button */
}

.checkin-event-selector {
    position: sticky;
    top: 32px;
    background: #ffffff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    z-index: 10;
}

.checkin-event-selector label {
    font-weight: bold;
    color: #2c3e50;
    margin-right: 10px;
}

.checkin-event-selector select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    min-width: 200px;
}

.tablenav.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 20px 0; /* Increased bottom margin to space from table */
}

.alignleft.actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alignright {
    float: right;
}

.search-box {
    float: right;
    margin-right: 10px;
}

.search-box input[type="search"] {
    padding: 3px 8px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 14px;
    line-height: 26px;
    height: 28px;
}

.search-box input[type="submit"] {
    padding: 0 10px;
    height: 28px;
    line-height: 26px;
    background: #f7f7f7;
    border: 1px solid #2271b1;
    border-radius: 3px;
    color: #2271b1;
    font-size: 14px;
    cursor: pointer;
}

.search-box input[type="submit"]:hover {
    background: #fafafa;
    border-color: #999;
    color: #222;
}

select.postform {
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 14px;
    line-height: 26px;
    height: 28px;
}

.button {
    padding: 0 10px;
    height: 28px;
    line-height: 26px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #555;
    font-size: 14px;
    cursor: pointer;
}

.button:hover {
    background: #fafafa;
    border-color: #999;
    color: #222;
}

.button-primary {
    background: #0073aa;
    border-color: #006799;
    color: #fff;
    text-decoration: none;
    text-shadow: none;
}

.button-primary:hover {
    background: #006799;
    border-color: #005d87;
    color: #fff;
}

.status-indicator {
    padding: 4px 8px;
    border-radius: 4px;
}

.status-checked-in {
    background: #2ecc71;
    color: #ffffff;
}

.status-pending {
    background: #e67e22;
    color: #ffffff;
}

.form-table th {
    width: 200px;
}

.form-table td input[type="text"],
.form-table td textarea {
    width: 400px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-table td textarea {
    height: 100px;
}

.form-table .note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Guest management table styles */
.checkin-guest-table th,
.checkin-guest-table td {
    padding: 12px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #ddd;
}

.checkin-guest-table tr:hover {
    background-color: #eefdf8; /* Light green hover effect */
}

/* Restore border for bulk select column and match width with No. column */
.checkin-guest-table th:nth-child(1),
.checkin-guest-table td:nth-child(1) {
    border: 1px solid #ddd;
    width: 50px;
    padding: 12px 0;
    text-align: center;
}

/* Match No. column width with bulk action */
.checkin-guest-table th:nth-child(2),
.checkin-guest-table td:nth-child(2) {
    width: 50px;
    border: 1px solid #ddd;
}

/* Set uniform width for Guest ID, Email, Phone Number, Checkin Status, and Actions */
.checkin-guest-table th:nth-child(3), /* Guest ID */
.checkin-guest-table td:nth-child(3),
.checkin-guest-table th:nth-child(5), /* Email */
.checkin-guest-table td:nth-child(5),
.checkin-guest-table th:nth-child(6), /* Phone Number */
.checkin-guest-table td:nth-child(6),
.checkin-guest-table th:nth-child(7), /* Checkin Status */
.checkin-guest-table td:nth-child(7),
.checkin-guest-table th:nth-child(8), /* Actions */
.checkin-guest-table td:nth-child(8) {
    width: 14%;
    border: 1px solid #ddd;
}

/* Allow Full Name column to expand for long names */
.checkin-guest-table th:nth-child(4), /* Full Name */
.checkin-guest-table td:nth-child(4) {
    width: auto;
    min-width: 14%;
    border: 1px solid #ddd;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .checkin-guest-table th,
    .checkin-guest-table td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        text-align: left;
        border: none;
        padding: 8px;
    }
    .checkin-guest-table th:nth-child(1),
    .checkin-guest-table td:nth-child(1) {
        display: none; /* Hide checkbox column on mobile */
    }
    .tablenav.top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .alignright, .search-box {
        float: none;
        margin-right: 0;
        width: 100%;
    }
    .search-box input[type="search"],
    .search-box input[type="submit"],
    select.postform,
    .button {
        width: 100%;
        box-sizing: border-box;
    }
    .checkin-card-section {
        flex-direction: column;
    }
    .checkin-side-by-side {
        grid-template-columns: 1fr;
    }
}