/**
 * Weight Loss Plan Plugin Styles
 * Main accent color: #FF0000 (red)
 */

/* ===== FORM WRAPPER WITH BACKGROUND IMAGE ===== */
.wlp-form-wrapper {
    position: relative;
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background image with overlay */
.wlp-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Background image URL is set in the form-template.php file */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Semi-transparent black overlay */
.wlp-form-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 2;
}

/* Form container */
.wlp-form-container {
    position: relative;
    z-index: 3;
    max-width: 1000px;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

/* ===== FORM HEADER ===== */
.wlp-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.wlp-form-header h2 {
    color: #FF0000;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
}

.wlp-form-header p {
    color: #666;
    font-size: 16px;
}

/* ===== FORM SECTIONS ===== */
.wlp-form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.wlp-form-section:last-of-type {
    border-bottom: none;
}

.wlp-section-title {
    color: #FF0000;
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #FF0000;
}

/* ===== FORM ROWS & GROUPS ===== */
.wlp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.wlp-form-group {
    margin-bottom: 20px;
}

.wlp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.wlp-form-group .required {
    color: #FF0000;
}

/* ===== FORM INPUTS ===== */
.wlp-form-group input[type="text"],
.wlp-form-group input[type="email"],
.wlp-form-group input[type="number"],
.wlp-form-group input[type="time"],
.wlp-form-group select,
.wlp-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background-color: #fff;
}

/* Fix for select dropdown height and text visibility */
.wlp-form-group select {
    height: 48px;
    line-height: 1.5;
    padding: 10px 15px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
    cursor: pointer;
}

/* Select option styling */
.wlp-form-group select option {
    padding: 10px;
    font-size: 15px;
    line-height: 1.5;
}

/* Placeholder-like styling for disabled options */
.wlp-form-group select option[disabled] {
    color: #999;
}

.wlp-form-group input:focus,
.wlp-form-group select:focus,
.wlp-form-group textarea:focus {
    outline: none;
    border-color: #FF0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.wlp-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Placeholder styling */
.wlp-form-group input::placeholder,
.wlp-form-group textarea::placeholder {
    color: #999;
    opacity: 1;
}

/* ===== FORM ACTIONS ===== */
.wlp-form-actions {
    text-align: center;
    margin-top: 40px;
}

.wlp-submit-btn {
    background: #FF0000;
    color: #fff;
    border: none;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.wlp-submit-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.wlp-submit-btn:active {
    transform: translateY(0);
}

.wlp-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== FORM MESSAGE ===== */
.wlp-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.wlp-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.wlp-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ===== HISTORY WRAPPER ===== */
.wlp-history-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.wlp-history-header {
    text-align: center;
    margin-bottom: 40px;
}

.wlp-history-header h2 {
    color: #FF0000;
    font-size: 32px;
    margin-bottom: 10px;
}

.wlp-history-header p {
    color: #666;
    font-size: 16px;
}

/* ===== HISTORY LIST ===== */
.wlp-history-list {
    display: grid;
    gap: 20px;
}

.wlp-history-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s ease;
}

.wlp-history-item.unread {
    border-color: #FF0000;
    background: #fff5f5;
}

.wlp-history-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.wlp-history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.wlp-history-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wlp-history-item-info h3 {
    margin: 0;
    color: #333;
    font-size: 22px;
}

.wlp-unread-badge {
    background: #FF0000;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.wlp-history-item-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.wlp-meta-item {
    color: #666;
    font-size: 14px;
}

.wlp-history-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.wlp-submission-date {
    color: #999;
    font-size: 14px;
}

.wlp-view-btn,
.wlp-public-view-btn {
    background: #FF0000;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wlp-view-btn:hover,
.wlp-public-view-btn:hover {
    background: #cc0000;
    transform: translateY(-1px);
}

/* ===== NOTIFICATIONS ===== */
.wlp-notifications-wrapper {
    display: inline-block;
}

.wlp-notification-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #FF0000;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
}

.wlp-notification-btn:hover {
    background: #cc0000;
    transform: scale(1.05);
}

.wlp-notification-icon {
    width: 24px;
    height: 24px;
}

.wlp-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    color: #FF0000;
    border: 2px solid #FF0000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* ===== PUBLIC SUBMISSIONS ===== */
.wlp-public-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.wlp-public-header {
    text-align: center;
    margin-bottom: 40px;
}

.wlp-public-header h2 {
    color: #FF0000;
    font-size: 32px;
    margin-bottom: 10px;
}

.wlp-public-header p {
    color: #666;
    font-size: 16px;
}

.wlp-public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.wlp-public-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s ease;
}

.wlp-public-card:hover {
    border-color: #FF0000;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.1);
    transform: translateY(-3px);
}

.wlp-public-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.wlp-public-avatar {
    width: 50px;
    height: 50px;
    background: #FF0000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.wlp-public-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
}

.wlp-public-meta {
    color: #999;
    font-size: 14px;
}

.wlp-public-stats {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.wlp-stat {
    text-align: center;
}

.wlp-stat-label {
    display: block;
    color: #999;
    font-size: 12px;
    margin-bottom: 5px;
}

.wlp-stat-value {
    display: block;
    color: #FF0000;
    font-size: 20px;
    font-weight: 700;
}

.wlp-stat-arrow {
    color: #FF0000;
    font-size: 24px;
    font-weight: 700;
}

.wlp-public-reason {
    margin-bottom: 20px;
}

.wlp-public-reason strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.wlp-public-reason p {
    color: #666;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

.wlp-public-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.wlp-public-date {
    color: #999;
    font-size: 13px;
}

/* ===== MODAL ===== */
.wlp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.wlp-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.wlp-modal-content {
    background: #fff;
    margin: 40px auto;
    padding: 40px;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wlp-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #999;
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.3s ease;
}

.wlp-modal-close:hover {
    color: #FF0000;
}

.wlp-detail-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wlp-detail-section:last-child {
    border-bottom: none;
}

.wlp-detail-section h3 {
    color: #FF0000;
    font-size: 20px;
    margin-bottom: 15px;
}

.wlp-detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

.wlp-detail-item {
    margin-bottom: 15px;
}

.wlp-detail-item strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.wlp-detail-item span,
.wlp-detail-item p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* ===== LOADING ===== */
.wlp-loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 18px;
}

/* ===== NO SUBMISSIONS ===== */
.wlp-no-submissions {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.wlp-no-submissions p {
    font-size: 18px;
}

/* ===== PAGINATION ===== */
.wlp-pagination {
    text-align: center;
    margin-top: 40px;
}

.wlp-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #fff;
    border: 2px solid #e0e0e0;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.wlp-pagination .page-numbers:hover,
.wlp-pagination .page-numbers.current {
    background: #FF0000;
    color: #fff;
    border-color: #FF0000;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .wlp-form-container {
        padding: 30px 20px;
    }
    
    .wlp-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .wlp-form-header h2 {
        font-size: 26px;
    }
    
    .wlp-section-title {
        font-size: 20px;
    }
    
    .wlp-history-item-header {
        flex-direction: column;
    }
    
    .wlp-history-item-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .wlp-history-item-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .wlp-detail-row {
        grid-template-columns: 1fr;
    }
    
    .wlp-public-grid {
        grid-template-columns: 1fr;
    }
    
    .wlp-modal-content {
        padding: 30px 20px;
        width: 95%;
        margin: 20px auto;
    }
}