/**
 * Public Styles for SSD-SHARE Plugin
 * Version: 1.0.0
 */

/* Primary Color Scheme */
:root {
    --ssd-primary: #0077B6;
    --ssd-primary-dark: #023E8A;
    --ssd-primary-light: #90E0EF;
    --ssd-success: #28a745;
    --ssd-warning: #ffc107;
    --ssd-danger: #dc3545;
}

/* Form Container */
.ssd-form-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: linear-gradient(135deg, var(--ssd-primary) 0%, var(--ssd-primary-dark) 100%);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.ssd-form-inner {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
}

/* Progress Stepper */
.ssd-progress-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.ssd-progress-stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.ssd-step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.ssd-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
    transition: all 0.3s;
}

.ssd-step.active .ssd-step-circle {
    background: var(--ssd-primary);
    color: #fff;
    transform: scale(1.1);
}

.ssd-step.completed .ssd-step-circle {
    background: var(--ssd-success);
    color: #fff;
}

.ssd-step-label {
    font-size: 12px;
    color: #666;
}

.ssd-step.active .ssd-step-label {
    color: var(--ssd-primary);
    font-weight: 600;
}

/* Form Fields */
.ssd-form-group {
    margin-bottom: 25px;
}

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

.ssd-form-label.required::after {
    content: ' *';
    color: var(--ssd-danger);
}

.ssd-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.ssd-form-control:focus {
    outline: none;
    border-color: var(--ssd-primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

.ssd-form-control.error {
    border-color: var(--ssd-danger);
}

.ssd-error-message {
    color: var(--ssd-danger);
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* File Upload */
.ssd-file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.ssd-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.ssd-file-upload-label {
    display: block;
    padding: 12px 15px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.ssd-file-upload-label:hover {
    border-color: var(--ssd-primary);
    background: rgba(0, 119, 182, 0.05);
}

.ssd-file-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
}

/* Form Buttons */
.ssd-form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 10px;
}

.ssd-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.ssd-btn-primary {
    background: var(--ssd-primary);
    color: #fff;
}

.ssd-btn-primary:hover {
    background: var(--ssd-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

.ssd-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.ssd-btn-secondary:hover {
    background: #5a6268;
}

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

/* Checkbox and Radio */
.ssd-checkbox,
.ssd-radio {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.ssd-checkbox input,
.ssd-radio input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ssd-checkbox label,
.ssd-radio label {
    cursor: pointer;
    font-size: 14px;
    margin: 0;
}

/* Loading Overlay */
.ssd-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ssd-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ssd-spin 1s linear infinite;
}

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

/* Toast Notifications */
.ssd-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    animation: ssd-slide-in 0.3s ease-out;
}

@keyframes ssd-slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.ssd-toast-success {
    background: var(--ssd-success);
    color: #fff;
}

.ssd-toast-error {
    background: var(--ssd-danger);
    color: #fff;
}

.ssd-toast-info {
    background: var(--ssd-primary);
    color: #fff;
}

.ssd-toast-warning {
    background: var(--ssd-warning);
    color: #000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ssd-form-container {
        margin: 20px;
        padding: 20px;
    }
    
    .ssd-form-inner {
        padding: 20px;
    }
    
    .ssd-progress-stepper {
        flex-wrap: wrap;
    }
    
    .ssd-step {
        flex-basis: 33.33%;
        margin-bottom: 20px;
    }
    
    .ssd-step-label {
        font-size: 10px;
    }
    
    .ssd-form-buttons {
        flex-direction: column;
    }
    
    .ssd-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ssd-step {
        flex-basis: 50%;
    }
    
    .ssd-step-circle {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}
