/* Prrr AI Image Processor - WordPress Plugin Styles */

/* Base container styles */
.prrr-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

.prrr-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
}

.prrr-card h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

/* Button styles */
.prrr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    box-sizing: border-box;
}

.prrr-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.prrr-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.prrr-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.prrr-btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.prrr-btn-google {
    background: #ffffff;
    color: #757575;
    border: 1px solid #dadce0;
    padding: 12px 20px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.prrr-btn-google:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.prrr-btn-small {
    padding: 8px 16px;
    font-size: 12px;
    min-height: 32px;
}

.prrr-btn-large {
    padding: 16px 32px;
    font-size: 16px;
    min-height: 52px;
}

.prrr-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Google icon */
.prrr-google-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Login form styles */
.prrr-login-form {
    text-align: center;
}

.prrr-auth-methods {
    margin-bottom: 30px;
}

.prrr-google-signin-btn {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.prrr-login-benefits {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    text-align: left;
}

.prrr-login-benefits h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
}

.prrr-login-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prrr-login-benefits li {
    padding: 8px 0;
    color: #6c757d;
    font-size: 14px;
}

/* User info styles */
.prrr-user-info {
    text-align: center;
}

.prrr-user-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.prrr-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
}

.prrr-user-details h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 18px;
}

.prrr-user-details p {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 14px;
}

.prrr-credits-info {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.prrr-credits-label {
    color: #495057;
    font-size: 14px;
}

.prrr-credits-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.prrr-user-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Payment styles */
.prrr-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.prrr-package {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    transition: all 0.3s ease;
    background: #ffffff;
}

.prrr-package:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.prrr-package-popular {
    border-color: #667eea;
    position: relative;
}

.prrr-package-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.prrr-package-header {
    text-align: center;
    margin-bottom: 20px;
}

.prrr-package-header h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 20px;
}

.prrr-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.prrr-currency {
    font-size: 18px;
    color: #6c757d;
}

.prrr-amount {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

.prrr-credits {
    text-align: center;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.prrr-credits-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.prrr-credits-label {
    color: #6c757d;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prrr-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.prrr-features li {
    padding: 8px 0;
    color: #495057;
    font-size: 14px;
}

.prrr-select-package {
    width: 100%;
}

/* Payment form styles */
.prrr-payment-form {
    max-width: 500px;
    margin: 0 auto;
}

.prrr-payment-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.prrr-payment-header h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.prrr-payment-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
}

.prrr-payment-total {
    color: #667eea;
}

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

.prrr-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
}

.prrr-card-element {
    background: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.prrr-card-element:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.prrr-card-errors {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
}

.prrr-form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

/* Success message styles */
.prrr-payment-success {
    text-align: center;
    padding: 40px 20px;
}

.prrr-success-icon {
    width: 64px;
    height: 64px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px auto;
}

.prrr-payment-success h4 {
    color: #28a745;
    margin: 0 0 15px 0;
}

/* Upload form styles */
.prrr-upload-info {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.prrr-upload-info h4 {
    margin: 0 0 15px 0;
    color: #1976d2;
}

.prrr-upload-info ol {
    margin: 0;
    padding-left: 20px;
}

.prrr-upload-info li {
    margin-bottom: 8px;
    color: #424242;
}

.prrr-file-upload-area {
    border: 2px dashed #ced4da;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
    position: relative;
}

.prrr-file-upload-area:hover,
.prrr-file-upload-area.prrr-drag-over {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.prrr-upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.prrr-upload-text {
    font-size: 16px;
    color: #495057;
    margin: 0 0 8px 0;
}

.prrr-browse-link {
    color: #667eea;
    text-decoration: underline;
    cursor: pointer;
}

.prrr-upload-hint {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

.prrr-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #e8f5e8;
    border-radius: 8px;
    border: 1px solid #28a745;
}

.prrr-remove-file {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.prrr-remove-file:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Width presets */
.prrr-widths-container > * + * {
    margin-top: 12px;
}

.prrr-preset-widths {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.prrr-preset-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prrr-preset-btn:hover,
.prrr-preset-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.prrr-widths-container input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
}

.prrr-field-hint {
    display: block;
    margin-top: 6px;
    color: #6c757d;
    font-size: 12px;
}

/* Processing options */
.prrr-processing-options {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.prrr-processing-options h4 {
    margin: 0 0 20px 0;
    color: #495057;
}

.prrr-options-grid {
    display: grid;
    gap: 16px;
}

.prrr-option-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.prrr-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
}

.prrr-checkbox-label input[type="checkbox"] {
    display: none;
}

.prrr-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.prrr-checkbox-label input[type="checkbox"]:checked + .prrr-checkmark {
    background: #667eea;
    border-color: #667eea;
}

.prrr-checkbox-label input[type="checkbox"]:checked + .prrr-checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Credits display */
.prrr-credits-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #e3f2fd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.prrr-cost-estimate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
}

.prrr-cost-amount {
    font-weight: 600;
    color: #856404;
}

/* Processing status */
.prrr-processing-status {
    text-align: center;
    padding: 40px 20px;
}

.prrr-status-header h4 {
    margin: 0 0 20px 0;
    color: #495057;
}

.prrr-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.prrr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.prrr-progress-text {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 30px;
}

.prrr-processing-log {
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.prrr-log-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.prrr-log-item:last-child {
    border-bottom: none;
}

.prrr-log-status {
    font-size: 16px;
}

.prrr-log-message {
    color: #495057;
    font-size: 14px;
}

/* Results */
.prrr-processing-results {
    padding: 20px 0;
}

.prrr-results-header {
    text-align: center;
    margin-bottom: 30px;
}

.prrr-results-header h4 {
    margin: 0 0 10px 0;
    color: #28a745;
}

.prrr-results-summary {
    color: #6c757d;
    font-size: 14px;
}

.prrr-results-list {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.prrr-result-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.prrr-result-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #e9ecef;
}

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

.prrr-result-info {
    flex: 1;
    min-width: 0;
}

.prrr-result-info h5 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
    word-break: break-word;
}

.prrr-original-name {
    margin: 0 0 12px 0;
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

.prrr-result-sizes {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.prrr-size-tag {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.prrr-results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading and error states */
.prrr-loading {
    text-align: center;
    padding: 40px 20px;
}

.prrr-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.prrr-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin: 16px 0;
    font-size: 14px;
}

.prrr-auth-warning {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    text-align: center;
    margin-bottom: 20px;
}

.prrr-auth-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* Responsive design */
@media (max-width: 768px) {
    .prrr-container {
        padding: 16px;
    }
    
    .prrr-card {
        padding: 20px;
    }
    
    .prrr-packages {
        grid-template-columns: 1fr;
    }
    
    .prrr-user-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .prrr-result-item {
        flex-direction: column;
    }
    
    .prrr-result-image {
        width: 100%;
        height: 200px;
    }
    
    .prrr-form-actions,
    .prrr-user-actions,
    .prrr-results-actions,
    .prrr-auth-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .prrr-btn {
        width: 100%;
        justify-content: center;
    }
    
    .prrr-preset-widths {
        flex-direction: column;
    }
    
    .prrr-preset-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .prrr-card {
        margin: 0 -10px;
        border-radius: 8px;
    }
    
    .prrr-package {
        padding: 16px;
    }
    
    .prrr-credits-display,
    .prrr-cost-estimate {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
