/**
 * Cloud Settings Styles
 * Styling for cloud account management UI
 */

.cloud-settings {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cloud-header {
    margin-bottom: 30px;
}

.cloud-header h3 {
    margin: 0 0 10px 0;
    color: #e0e0e0;
}

.cloud-header .text-muted {
    color: #999;
    margin: 0;
}

/* Accounts List */
.cloud-accounts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    min-height: 200px;
}

.loading-indicator {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #999;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Account Card */
.cloud-account-card {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.cloud-account-card:hover {
    border-color: #4a9eff;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.1);
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.account-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border-radius: 10px;
}

.account-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.account-name {
    font-size: 18px;
    font-weight: 600;
    color: #e0e0e0;
}

.account-username {
    font-size: 14px;
    color: #999;
}

.account-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-connected {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.status-disconnected {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border: 1px solid #ff4444;
}

/* Account Stats */
.account-stats {
    margin-bottom: 15px;
}

.stat {
    margin-bottom: 10px;
}

.stat-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 14px;
    color: #e0e0e0;
}

/* Account Error */
.account-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    color: #ff6b6b;
    font-size: 14px;
    word-break: break-word;
}

/* Account Actions */
.account-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* No Accounts State */
.no-accounts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-accounts-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-accounts p {
    margin: 10px 0;
}

.no-accounts .text-muted {
    font-size: 14px;
}

/* Add Account Section */
.cloud-add-section {
    text-align: center;
    padding: 20px;
}

/* Modal */
.cloud-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cloud-modal-content {
    background: #2a2a2a;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.cloud-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.cloud-modal-header h4 {
    margin: 0;
    color: #e0e0e0;
}

.cloud-modal-close {
    background: none;
    border: none;
    color: #999;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.cloud-modal-close:hover {
    color: #fff;
}

.cloud-modal-body {
    padding: 20px;
}

.cloud-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px;
    padding-top: 0;
}

/* Platform Options */
.platform-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.platform-option {
    cursor: pointer;
}

.platform-option input[type="radio"] {
    display: none;
}

.platform-card {
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.platform-option:hover .platform-card {
    border-color: #4a9eff;
}

.platform-option input[type="radio"]:checked + .platform-card {
    border-color: #4a9eff;
    background: rgba(74, 158, 255, 0.1);
}

.platform-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.platform-name {
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 5px;
}

.platform-desc {
    font-size: 12px;
    color: #999;
}

/* Platform Fields */
.platform-fields {
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

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

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #4a9eff;
}

.form-control::placeholder {
    color: #666;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary {
    background: #4a9eff;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #3a8eef;
}

.btn-secondary {
    background: #444;
    color: #e0e0e0;
}

.btn-secondary:hover:not(:disabled) {
    background: #555;
}

.btn-danger {
    background: #ff4444;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #ff3333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.alert-danger {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff6b6b;
}

/* Toast Notifications */
.cloud-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.cloud-toast {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(450px);
    transition: transform 0.3s ease;
}

.cloud-toast.show {
    transform: translateX(0);
}

.cloud-toast-success {
    border-left: 4px solid #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.cloud-toast-error {
    border-left: 4px solid #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.cloud-toast-info {
    border-left: 4px solid #4a9eff;
    background: rgba(74, 158, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cloud-accounts-list {
        grid-template-columns: 1fr;
    }

    .platform-options {
        grid-template-columns: 1fr;
    }

    .account-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .account-actions {
        flex-direction: column;
        width: 100%;
    }

    .account-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .cloud-toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}
