/**
 * Frontend Styles for Volunteer Exchange Platform
 */

/* Messages */
.vep-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-weight: 500;
}

.vep-message.vep-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.vep-message.vep-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.vep-message.vep-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Form Styles */
.vep-form {
    max-width: 800px;
    margin: 0 auto;
}

.vep-form-group {
    margin-bottom: 20px;
}

.vep-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.vep-form-group .required {
    color: #dc3545;
}

.vep-form-group input[type="text"],
.vep-form-group input[type="email"],
.vep-form-group input[type="url"],
.vep-form-group input[type="tel"],
.vep-form-group input[type="number"],
.vep-form-group input[type="file"],
.vep-form-group select,
.vep-form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.vep-form-group input:focus,
.vep-form-group select:focus,
.vep-form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.vep-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

/* Checkbox Group */
.vep-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vep-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.vep-checkbox-label:hover {
    background-color: #f8f9fa;
}

.vep-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: auto;
}

.vep-checkbox-label span {
    font-weight: 500;
}

.vep-tag-description {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 13px;
    font-weight: normal;
}

/* Button Styles */
.vep-button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.vep-button-primary {
    background-color: #007bff;
    color: #fff;
}

.vep-button-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.vep-button-secondary {
    background-color: #6c757d;
    color: #fff;
}

.vep-button-secondary:hover {
    background-color: #545b62;
}

.vep-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vep-form-label-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vep-inline-action {
    background: transparent;
    border: 0;
    color: #6c757d;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.vep-inline-action:hover {
    color: #343a40;
}

.vep-participant-preference-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vep-participant-preference-modal-dialog {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 520px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.vep-participant-preference-modal-dialog h3 {
    margin: 0 0 8px;
}

.vep-participant-preference-modal-dialog p {
    margin: 0 0 16px;
    color: #666;
}

.vep-participant-preference-options {
    display: grid;
    gap: 10px;
}

.vep-participant-preference-options .vep-button {
    width: 100%;
    text-align: left;
}

/* Participants Grid */
.vep-participants-grid {
    margin: 40px 0;
}

.vep-grid-filter {
    margin-bottom: 20px;
}

.vep-grid-filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.vep-grid-search {
    max-width: 420px;
}

.vep-grid-search-input {
    width: 100%;
}

.vep-grid-tag-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vep-grid-tag-filter-button {
    border: 1px solid #d0d7de;
    background-color: #fff;
    color: #1f2328;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.vep-grid-tag-filter-button:hover {
    border-color: #9aa4b2;
    background-color: #f6f8fa;
}

.vep-grid-tag-filter-button.is-active {
    background-color: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.vep-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 30px;
    align-items: stretch;
}

.vep-grid-item {
    display: flex;
}

.vep-participant-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.vep-participant-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.vep-participant-logo {
    width: 120px;
    height: 120px;
    margin: 20px auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}

.vep-participant-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.vep-participant-info h3 {
    font-size: 18px;
    margin: 0 0 8px;
    color: #333;
    padding: 0 20px;
}

.vep-participant-type {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    display: block;
    align-self: stretch;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 6px 12px;
    border-radius: 0;
    line-height: 1.2;
    box-sizing: border-box;
    text-align: center;
}

.vep-participant-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vep-view-details {
    margin-top: auto;
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 20px;
}

.vep-participant-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 15px 0;
}

/* Agreements List */
.vep-agreements-list {
    margin: 30px 0;
}

.vep-agreements-search {
    margin-bottom: 14px;
    max-width: 420px;
}

.vep-agreements-title {
    margin: 0 0 15px;
}

.vep-agreements-table-wrap {
    overflow-x: auto;
}

.vep-agreements-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.vep-agreements-table th,
.vep-agreements-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    text-align: left;
}

.vep-agreements-table thead th {
    background: #f8f9fa;
    font-weight: 700;
    color: #333;
}

.vep-agreements-table tbody tr:nth-child(even) {
    background: #fcfcfc;
}

.vep-agreements-col-num {
    width: 48px;
    text-align: right;
    white-space: nowrap;
    color: #555;
}

.vep-participants-table .vep-participants-table-col-action {
    text-align: right;
}

.vep-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #ffdfd3;
    color: #000;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
}

/* Agreement Form */
.vep-agreement-form {
    max-width: 900px;
    margin: 0 auto;
}

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

.vep-form-half {
    flex: 1;
}

.vep-radio-label {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
}

.vep-radio-label input[type="radio"] {
    margin-right: 8px;
    width: auto;
}

.vep-initiator-label {
    border: 2px solid transparent;
    transition: all 0.2s;
}

.vep-initiator-label:has(input:checked) {
    background-color: #e7f3ff;
    border-color: #007bff;
}

/* Responsive */
@media (max-width: 768px) {
    .vep-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    
    .vep-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .vep-grid {
        grid-template-columns: 1fr;
    }
}

/* Multistep Registration */
.vep-registration-multistep .vep-step {
    display: none;
}

.vep-registration-multistep .vep-step.is-active {
    display: block;
}

.vep-registration-multistep .vep-form-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 16px;
}

.vep-registration-multistep .vep-steps-indicator {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin: 10px 0 18px;
}

.vep-registration-multistep .vep-step-dot {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #cbd5e1;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.vep-registration-multistep .vep-step-dot.is-active {
    background: #2563eb;
    color: #ffffff;
}

/* Participant Detail Page */
.vep-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.vep-participant-detail-page {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
}

.vep-participant-detail-header {
    background: #fff;
    padding: 0px 0px 30px 0px;
    text-align: center;
    color: #000;
}

.vep-participant-type {
    background:#ffdfd3;
    color: #000;
}

.vep-participant-type h2 {
    color: #000;
}

.vep-participant-detail-logo {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.vep-participant-detail-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.vep-participant-detail-header h1 {
    margin: 0 0 15px;
    padding: 0px 25px;
    font-size: 42px;
    font-weight: 700;
    color: #000;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vep-participant-detail-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin: 0;
    opacity: 0.95;
}

.vep-participant-detail-content {
    padding: 20px 60px 50px 60px;
}

.vep-detail-section {
    margin-bottom: 45px;
    padding-bottom: 35px;
    border-bottom: 2px solid #e8e8e8;
}

.vep-detail-section.first {
    margin-bottom: 45px;
    padding-top: 35px;
    padding-bottom: 35px;
    border-top: 2px solid #e8e8e8;
    border-bottom: 2px solid #e8e8e8;
}

.vep-detail-section:last-of-type {
    border-bottom: none;
}

.vep-detail-section h2 {
    font-size: 28px;
    margin: 0 0 25px;
    color: #333;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.vep-detail-section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.vep-detail-item {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
    line-height: 1.8;
    font-size: 16px;
}

.vep-detail-item strong {
    min-width: 140px;
    color: #555;
    font-weight: 700;
}

.vep-detail-item span,
.vep-detail-item a {
    color: #333;
    flex: 1;
}

.vep-detail-item a {
    color: #667eea;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.vep-detail-item a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.vep-detail-description {
    line-height: 1.9;
    color: #444;
    font-size: 17px;
}

.vep-detail-actions {
    margin-top: 50px;
    text-align: center;
}

.vep-detail-actions .vep-button {
    min-width: 240px;
    padding: 15px 30px;
    font-size: 17px;
}

/* Update Participant Page */
.vep-update-participant-page {
    border: 1px solid #d8e2f0;
    box-shadow: 0 14px 36px rgba(25, 42, 70, 0.12);
}

.vep-update-participant-page .vep-page-title {
    margin: 0;
    padding: 26px 34px 20px;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 800;
    color: #16324f;
    border-bottom: 1px solid #dbe6f4;
    background: linear-gradient(140deg, #f7fbff 0%, #eef5ff 100%);
}

.vep-update-participant-page .vep-participant-detail-content {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.vep-update-participant-page .vep-update-participant-form {
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
}

.vep-update-participant-page .vep-form-group {
    margin-bottom: 0;
}

.vep-update-participant-page .vep-form-group:nth-of-type(5),
.vep-update-participant-page .vep-form-group:nth-of-type(6),
.vep-update-participant-page .vep-form-group:nth-of-type(7),
.vep-update-participant-page .vep-form-group:nth-of-type(8),
.vep-update-participant-page .vep-form-group:nth-of-type(9),
.vep-update-participant-page .vep-form-group:nth-of-type(10),
.vep-update-participant-page .vep-form-group:nth-of-type(11) {
    grid-column: 1 / -1;
}

.vep-update-participant-page .vep-form-group input[type="text"],
.vep-update-participant-page .vep-form-group input[type="email"],
.vep-update-participant-page .vep-form-group input[type="tel"],
.vep-update-participant-page .vep-form-group input[type="number"],
.vep-update-participant-page .vep-form-group input[type="file"],
.vep-update-participant-page .vep-form-group select,
.vep-update-participant-page .vep-form-group textarea {
    border-color: #c9d8ec;
    background: #ffffff;
}

.vep-update-participant-page .vep-form-group input:focus,
.vep-update-participant-page .vep-form-group select:focus,
.vep-update-participant-page .vep-form-group textarea:focus {
    border-color: #2e6fbe;
    box-shadow: 0 0 0 4px rgba(46, 111, 190, 0.16);
}

.vep-update-participant-page .vep-checkbox-group {
    max-height: none;
    overflow: visible;
    padding: 4px;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    background: #f8fbff;
}

.vep-update-participant-page .vep-current-logo-wrapper {
    display: inline-block;
    margin-top: 12px;
}

.vep-update-participant-page .vep-current-logo-wrapper.is-hidden {
    display: none;
}

.vep-update-participant-page .vep-current-logo-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 140px;
    height: 140px;
    padding: 10px;
    border: 1px solid #d7e2ef;
    border-radius: 12px;
    background: #ffffff;
}

.vep-logo-remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #dc3545;
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.vep-logo-remove-btn:hover {
    background: #b02a37;
}

.vep-update-participant-page .vep-current-logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .vep-page-wrapper {
        padding: 10px;
    }
    
    .vep-participant-detail-page {
        border-radius: 8px;
    }
    
    .vep-participant-detail-header {
        padding: 40px 0px;
    }
    
    .vep-participant-detail-logo {
        width: 150px;
        height: 150px;
        margin-bottom: 20px;
    }
    
    .vep-participant-detail-header h1 {
        font-size: 28px;
        padding: 0px 25px;
    }
    
    .vep-participant-detail-header h2 {
        font-size: 18px;
    }
    
    .vep-participant-detail-content {
        padding: 30px 25px;
    }
    
    .vep-detail-section h2 {
        font-size: 22px;
    }
    
    .vep-detail-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .vep-detail-item strong {
        min-width: auto;
    }

    .vep-update-participant-page .vep-participant-detail-content {
        padding: 24px 18px;
    }

    .vep-update-participant-page .vep-page-title {
        font-size: 24px;
        padding: 20px 20px 16px;
    }

    .vep-update-participant-page .vep-update-participant-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .vep-update-participant-page .vep-current-logo-preview {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .vep-participant-detail-header h1 {
        font-size: 24px;
        padding: 0px 25px;
    }
    
    .vep-detail-section h2 {
        font-size: 20px;
    }
    
    .vep-detail-actions .vep-button {
        min-width: 100%;
    }
}

.vep-event-countdown {
    max-width: 960px;
    margin: 20px auto;
    padding: 28px 24px;
    background: linear-gradient(145deg, #fff7ea 0%, #ffe4bf 100%);
    border: 1px solid #f2d1a4;
    border-radius: 20px;
    box-shadow: 0 16px 36px rgba(120, 84, 31, 0.12);
}

.vep-event-countdown-timer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 14px;
}

.vep-event-countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 126px;
    padding: 18px 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(210, 151, 67, 0.25);
    border-radius: 16px;
    text-align: center;
}

.vep-event-countdown-value {
    font-size: 42px;
    line-height: 1;
    font-weight: 700;
    color: #7a3b00;
}

.vep-event-countdown-label {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a5c24;
}

.vep-event-countdown-status {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #7a3b00;
}

@media (max-width: 768px) {
    .vep-event-countdown {
        padding: 22px 16px;
    }

    .vep-event-countdown-timer {
        grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
        gap: 10px;
    }

    .vep-event-countdown-unit {
        min-height: 108px;
        padding: 14px 10px;
    }

    .vep-event-countdown-value {
        font-size: 34px;
    }

    .vep-event-countdown-status {
        font-size: 22px;
    }
}
