/* Pearl College Application Manager - Frontend Styles */

#pcam-application-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.pcam-form-title {
    text-align: center;
    color: #2097AC;
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: 600;
    position: relative;
}

.pcam-form-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #2097AC, #4BC0D9);
    border-radius: 2px;
}

.pcam-form-section {
    margin-bottom: 40px;
    padding: 25px;
    border: 1px solid #e8e9ea;
    border-radius: 8px;
    background: #fafbfc;
    transition: all 0.3s ease;
}

.pcam-form-section:hover {
    border-color: #2097AC;
    box-shadow: 0 2px 10px rgba(32, 151, 172, 0.1);
}

.pcam-form-section h3 {
    margin: 0 0 25px 0;
    color: #2097AC;
    font-size: 22px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #2097AC;
    position: relative;
}

.pcam-form-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background: #4BC0D9;
    border-radius: 1px;
}

/* Grid Layout */
.pcam-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.pcam-form-group {
    margin-bottom: 0;
}

.pcam-form-group.pcam-col-span-2 {
    grid-column: span 2;
}

.pcam-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.pcam-form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    cursor: pointer;
}

.pcam-form-group select:focus {
    outline: none;
    border-color: #2097AC;
    box-shadow: 0 0 0 3px rgba(32, 151, 172, 0.1);
    transform: translateY(-1px);
}

.pcam-form-group select option {
    padding: 10px;
    background: #fff;
    color: #333;
}

.pcam-form-group input:focus,
.pcam-form-group select:focus,
.pcam-form-group textarea:focus {
    outline: none;
    border-color: #2097AC;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
    transform: translateY(-1px);
}

.pcam-form-group input::placeholder,
.pcam-form-group textarea::placeholder {
    color: #999;
    font-style: italic;
}

.pcam-form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

.pcam-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    font-weight: 500 !important;
    margin-bottom: 0 !important;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    line-height: 1.6;
}

.pcam-checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 4px 0 0 0;
    flex-shrink: 0;
    transform: scale(1.2);
}

.pcam-form-actions {
    text-align: center;
    margin: 40px 0;
}

.pcam-submit-button {
    background: linear-gradient(135deg, #2097AC, #4BC0D9);
    color: white;
    border: none;
    padding: 16px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 220px;
    position: relative;
    overflow: hidden;
}

.pcam-submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.pcam-submit-button:hover::before {
    left: 100%;
}

.pcam-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.3);
}

.pcam-submit-button:active {
    transform: translateY(0);
}

.pcam-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pcam-submit-button:disabled::before {
    display: none;
}

#pcam-form-messages {
    margin-top: 20px;
}

.pcam-message {
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
}

.pcam-message.error {
    background: #fee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.pcam-message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Modal Styles */
.pcam-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.pcam-modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    animation: pcamModalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes pcamModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pcam-modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #2097AC, #4BC0D9);
    color: white;
}

.pcam-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.pcam-modal-close {
    font-size: 28px;
    font-weight: bold;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.pcam-modal-close:hover {
    color: white;
}

.pcam-modal-body {
    padding: 30px;
    text-align: center;
}

.pcam-success-icon {
    font-size: 72px;
    color: #28a745;
    margin-bottom: 20px;
    display: block;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.pcam-modal-body p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #555;
    font-size: 16px;
}

.pcam-modal-footer {
    padding: 20px 30px 30px;
    text-align: center;
}

.pcam-modal-close-btn {
    background: linear-gradient(135deg, #2097AC, #4BC0D9);
    color: white;
    border: none;
    padding: 14px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pcam-modal-close-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

/* reCAPTCHA styling */
.g-recaptcha {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    #pcam-application-form-container {
        padding: 20px;
        margin: 0 15px;
        border-radius: 8px;
    }
    
    .pcam-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pcam-form-group.pcam-col-span-2 {
        grid-column: span 1;
    }
    
    .pcam-form-title {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    .pcam-form-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .pcam-submit-button {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        min-width: auto;
    }
    
    .pcam-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .pcam-modal-header,
    .pcam-modal-body,
    .pcam-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .pcam-form-grid {
        gap: 10px;
    }
    
    .pcam-form-group input,
    .pcam-form-group select,
    .pcam-form-group textarea {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .pcam-form-title {
        font-size: 22px;
    }
    
    .pcam-form-section h3 {
        font-size: 18px;
    }
}

/* Loading state */
.pcam-loading .pcam-submit-text {
    display: none;
}

.pcam-loading .pcam-loading-text {
    display: inline !important;
}

.pcam-loading .pcam-submit-button {
    position: relative;
}

.pcam-loading .pcam-submit-button:after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Field validation styles */
.pcam-field-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

.pcam-modal-open {
    overflow: hidden;
}
