/* استایل‌های فرانت‌اند - بهبود یافته و ریسپانسیو */

.royal-cert-request-form {
    max-width: 700px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.royal-cert-field {
    margin-bottom: 25px;
}

.royal-cert-field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1d2327;
    font-size: 15px;
}

.royal-cert-select-wrapper {
    position: relative;
}

.royal-cert-course-search {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    transition: all 0.3s;
    box-sizing: border-box;
}

.royal-cert-course-search:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.royal-cert-course-search::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
}

.royal-cert-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 12px;
}

.royal-cert-course-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #2271b1;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: -2px;
}

.royal-cert-course-dropdown.active {
    display: block;
}

.royal-cert-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.royal-cert-dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f1;
}

.royal-cert-dropdown-item:last-child {
    border-bottom: none;
}

.royal-cert-dropdown-item:hover,
.royal-cert-dropdown-item.highlighted {
    background: #f0f6fc;
    color: #2271b1;
}

.royal-cert-dropdown-item.selected {
    background: #2271b1;
    color: #fff;
}

.royal-cert-dropdown-item.selected:hover {
    background: #135e96;
}

.royal-cert-dropdown-item.royal-cert-no-results {
    color: #646970;
    cursor: default;
    text-align: center;
    font-style: italic;
}

.royal-cert-dropdown-item.royal-cert-no-results:hover {
    background: #fff;
}

.royal-cert-submit-btn {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
    padding: 14px 35px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.2);
    width: 100%;
}

.royal-cert-submit-btn:hover {
    background: linear-gradient(135deg, #135e96 0%, #0f4c75 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}

.royal-cert-submit-btn:active {
    transform: translateY(0);
}

.royal-cert-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    display: none;
    font-size: 14px;
    line-height: 1.6;
}

.royal-cert-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    display: block;
}

.royal-cert-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    display: block;
}

/* استایل‌های لیست گواهینامه‌ها */
.royal-cert-requests-list {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.royal-cert-requests-list h3 {
    margin-bottom: 25px;
    color: #1d2327;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.royal-cert-requests-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.royal-cert-requests-table thead {
    background-color: #f0f0f0;
}

.royal-cert-requests-table th {
    padding: 15px;
    text-align: right;
    border: 1px solid #ddd;
    font-weight: 600;
    color: #1d2327;
}

.royal-cert-requests-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    color: #646970;
}

.royal-cert-requests-table tbody tr:hover {
    background-color: #f9f9f9;
}

.royal-cert-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.royal-cert-status.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.royal-cert-status.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.royal-cert-status.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.royal-cert-download-list {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.royal-cert-download-list h3 {
    margin-bottom: 25px;
    color: #1d2327;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.royal-cert-certificates {
    list-style: none;
    padding: 0;
    margin: 0;
}

.royal-cert-certificate-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.royal-cert-certificate-item:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
    transform: translateY(-2px);
}

.cert-info {
    flex: 1;
}

.cert-info strong {
    display: block;
    font-size: 20px;
    color: #1d2327;
    margin-bottom: 8px;
    font-weight: 600;
}

.cert-date {
    color: #646970;
    font-size: 15px;
    display: block;
    margin-top: 5px;
}

.cert-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.royal-cert-view-btn,
.royal-cert-download-btn {
    padding: 10px 24px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.royal-cert-view-btn {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.2);
}

.royal-cert-view-btn:hover {
    background: linear-gradient(135deg, #135e96 0%, #0f4c75 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}

.royal-cert-download-btn {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.royal-cert-download-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .royal-cert-request-form {
        margin: 20px 15px;
        padding: 20px;
    }
    
    .royal-cert-certificate-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cert-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .royal-cert-view-btn,
    .royal-cert-download-btn {
        width: 100%;
    }
    
    .royal-cert-download-list {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .royal-cert-request-form {
        padding: 15px;
    }
    
    .royal-cert-submit-btn {
        padding: 12px 25px;
        font-size: 15px;
    }
    
    .cert-info strong {
        font-size: 18px;
    }
}
