/**
 * Customer Portal Styles
 * Styles for registration, dashboard, and press release submission
 */

/* ========================================
   Common Styles
   ======================================== */

.customer-portal-wrapper,
.customer-dashboard-wrapper,
.press-release-form-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.required {
    color: #e74c3c;
}

.form-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 16px 0;
    display: none;
}

.form-message.error {
    display: block;
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.form-message.success {
    display: block;
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-submit {
    position: relative;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Registration Page
   ======================================== */

.registration-container {
    max-width: 500px;
    margin: 0 auto;
}

.registration-card,
.registration-success {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.registration-header {
    text-align: left;
    margin-bottom: 32px;
}

.registration-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #2c3e50;
}

.registration-header p {
    color: #7f8c8d;
    font-size: 16px;
}

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

.registration-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.registration-form input[type="text"],
.registration-form input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.registration-form input:focus {
    outline: none;
    border-color: #3498db;
}

.checkbox-group {
    margin: 24px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 4px;
}

.registration-form .btn-submit {
    width: 100%;
    justify-content: center;
}

.registration-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.registration-footer a {
    color: #3498db;
    text-decoration: none;
}

/* Registration Success */
.registration-success {
    text-align: center;
}

.success-icon {
    color: #27ae60;
    margin-bottom: 24px;
}

.registration-success h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: #2c3e50;
}

.success-instructions {
    color: #7f8c8d;
    margin: 16px 0;
}

.resend-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #eee;
}

/* ========================================
   Customer Login Page
   ======================================== */

/* Override any theme styles that might interfere - login page only */
.customer-portal-wrapper .login-container {
    max-width: 500px;
    margin: 0 auto !important;
    padding: 20px;
    width: 100%;
    display: block;
    text-align: left;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-header {
    text-align: left;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #2c3e50;
}

.login-header p {
    color: #7f8c8d;
    font-size: 16px;
}

#customer-login-form .form-group {
    margin-bottom: 20px;
}

#customer-login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

#customer-login-form input[type="text"],
#customer-login-form input[type="email"],
#customer-login-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#customer-login-form input:focus {
    outline: none;
    border-color: #3498db;
}

#customer-login-form .btn-block {
    width: 100%;
    justify-content: center;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.login-footer p {
    margin: 8px 0;
}

.login-footer a {
    color: #3498db;
    text-decoration: none;
}

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

/* ========================================
   Email Verification Page
   ======================================== */

.verification-container {
    max-width: 500px;
    margin: 0 auto;
}

.verification-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.verification-pending,
.verification-success,
.verification-error {
    text-align: center;
}

.pending-icon,
.error-icon {
    margin-bottom: 24px;
}

.pending-icon {
    color: #f39c12;
}

.success-icon {
    color: #27ae60;
}

.error-icon {
    color: #e74c3c;
}

.verification-card h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: #2c3e50;
}

.spinner-large {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 24px auto;
}

.redirect-message {
    margin: 24px 0;
    color: #7f8c8d;
}

.resend-form {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.resend-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* ========================================
   Password Setup Page
   ======================================== */

.password-setup-container {
    max-width: 500px;
    margin: 0 auto;
}

.password-setup-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.password-setup-header {
    text-align: center;
    margin-bottom: 32px;
}

.success-icon-small {
    color: #27ae60;
    margin-bottom: 16px;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #7f8c8d;
    padding: 4px;
}

.toggle-password:hover {
    color: #2c3e50;
}

.password-strength {
    margin-top: 8px;
}

.strength-meter {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-meter-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
}

.strength-meter-fill.weak { background: #e74c3c; }
.strength-meter-fill.medium { background: #f39c12; }
.strength-meter-fill.strong { background: #3498db; }
.strength-meter-fill.very-strong { background: #27ae60; }

.strength-text {
    font-size: 14px;
    color: #7f8c8d;
}

.password-requirements {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    margin: 20px 0;
}

.requirements-title {
    font-weight: 500;
    margin-bottom: 8px;
    color: #2c3e50;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: #7f8c8d;
}

.requirement.met {
    color: #27ae60;
}

.req-icon {
    font-weight: bold;
}

/* ========================================
   Customer Dashboard
   ======================================== */

.dashboard-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 32px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
}

.dashboard-header h1 {
    font-size: 32px;
    margin-bottom: 4px;
    color: #2c3e50;
}

.company-name {
    color: #7f8c8d;
    font-size: 16px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.header-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.stat-card:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 18px;
    height: 18px;
}

.stat-content {
    min-width: 0;
    flex: 1;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Submissions Section */
.submissions-section {
    margin-top: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    color: #2c3e50;
}

.view-toggle {
    display: flex;
    gap: 8px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 8px;
}

.toggle-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #7f8c8d;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: white;
    color: #3498db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Submission Cards */
.submissions-list {
    display: grid;
    gap: 20px;
}

.submission-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    transition: all 0.3s;
}

.submission-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.submission-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.submission-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.submission-content {
    flex: 1;
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.submission-header h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.draft {
    background: #f0f0f0;
    color: #7f8c8d;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.submission-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #7f8c8d;
}

.submission-actions {
    display: flex;
    gap: 8px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    color: #ccc;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.empty-state p {
    color: #7f8c8d;
    margin-bottom: 24px;
}

/* ========================================
   Press Release Form
   ======================================== */

.form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 40px;
}

.form-header {
    margin-bottom: 32px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3498db;
    text-decoration: none;
    margin-bottom: 16px;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

.form-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
    color: #2c3e50;
}

.form-header p {
    color: #7f8c8d;
}

/* Progress Steps */
.form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 24px 0;
    border-bottom: 1px solid #eee;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s;
}

.progress-step.active .step-number {
    background: #3498db;
    color: white;
}

.progress-step.completed .step-number {
    background: #27ae60;
    color: white;
}

.step-label {
    font-size: 14px;
    color: #7f8c8d;
}

.progress-step.active .step-label {
    color: #3498db;
    font-weight: 500;
}

.progress-line {
    width: 80px;
    height: 2px;
    background: #f0f0f0;
    margin: 0 16px;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.step-title {
    font-size: 24px;
    margin-bottom: 24px;
    color: #2c3e50;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.field-hint {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: #7f8c8d;
}

/* Link Rows */
.link-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 8px;
    margin-bottom: 8px;
}

.btn-remove-link {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    color: #e74c3c;
    transition: all 0.3s;
}

.btn-remove-link:hover {
    background: #fee;
    border-color: #e74c3c;
}

.btn-add-link {
    margin-top: 8px;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
        gap: 8px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-icon {
        width: 24px;
        height: 24px;
    }
    
    .stat-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .submission-card {
        flex-direction: column;
    }
    
    .submission-image {
        width: 100%;
        height: 200px;
    }
    
    .form-progress {
        flex-direction: column;
        gap: 16px;
    }
    
    .progress-line {
        width: 2px;
        height: 40px;
        margin: 0;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
