/**
 * PCP Registration Styles
 * 
 * @package PublicationCoPilot
 */

/* Container */
#pcp-registration-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Tabs */
.pcp-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
}

.pcp-tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.pcp-tab-btn:hover {
    color: #374151;
}

.pcp-tab-btn.active {
    color: #007cba;
}

.pcp-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #007cba;
}

/* Tab Content */
.pcp-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.pcp-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Forms */
.pcp-form {
    margin-bottom: 20px;
}

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

.pcp-form-row {
    display: flex;
    gap: 15px;
}

.pcp-form-row .pcp-form-group {
    flex: 1;
}

.pcp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.pcp-form-group input[type="text"],
.pcp-form-group input[type="email"],
.pcp-form-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.pcp-form-group input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0,124,186,0.1);
}

.pcp-form-group input.error {
    border-color: #dc3545;
}

.pcp-field-error {
    display: block;
    margin-top: 5px;
    color: #dc3545;
    font-size: 13px;
    min-height: 18px;
}

/* Legal Section */
.pcp-legal-section {
    background: #f9fafb;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.pcp-checkbox-group {
    margin-bottom: 12px;
}

.pcp-checkbox-group:last-child {
    margin-bottom: 0;
}

.pcp-checkbox-group label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.pcp-checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 2px;
    cursor: pointer;
}

.pcp-checkbox-group a {
    color: #007cba;
    text-decoration: none;
}

.pcp-checkbox-group a:hover {
    text-decoration: underline;
}

/* Buttons */
.pcp-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.pcp-btn-primary {
    background: #007cba;
    color: white;
    width: 100%;
}

.pcp-btn-primary:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,124,186,0.3);
}

.pcp-btn-secondary {
    background: #6b7280;
    color: white;
    width: 100%;
}

.pcp-btn-secondary:hover:not(:disabled) {
    background: #4b5563;
}

.pcp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.pcp-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

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

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

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

.pcp-message a {
    color: inherit;
    text-decoration: underline;
}

/* Form Footer */
.pcp-form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #6b7280;
}

.pcp-form-footer a {
    color: #007cba;
    text-decoration: none;
}

.pcp-form-footer a:hover {
    text-decoration: underline;
}

/* Resend Section */
.pcp-resend-section {
    margin-top: 30px;
}

.pcp-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 30px 0 20px;
}

.pcp-resend-section h3 {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 15px;
}

/* Modal */
.pcp-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.pcp-modal-content {
    position: relative;
    background: white;
    margin: 10% auto;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pcp-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.pcp-modal-close:hover {
    color: #333;
}

#pcp-modal-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

#pcp-modal-message {
    margin-bottom: 20px;
    color: #4b5563;
    line-height: 1.6;
}

.pcp-modal-buttons {
    display: flex;
    gap: 10px;
}

.pcp-modal-buttons .pcp-btn {
    flex: 1;
    padding: 10px 20px;
    font-size: 14px;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    #pcp-registration-container {
        margin: 20px;
        padding: 20px;
    }
    
    .pcp-form-row {
        flex-direction: column;
    }
    
    .pcp-modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 20px;
    }
    
    .pcp-modal-buttons {
        flex-direction: column;
    }
}

/* Accessibility */
.pcp-btn:focus,
.pcp-tab-btn:focus,
input:focus,
a:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Loading State */
.pcp-loading {
    position: relative;
    pointer-events: none;
}

.pcp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notice for logged in users */
.pcp-notice {
    padding: 15px;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    color: #0c5460;
    text-align: center;
}

.pcp-notice a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.pcp-notice a:hover {
    text-decoration: underline;
}