/**
 * Coinley Settings Page - Styles
 *
 * Modern, clean design for wallet management interface
 *
 * @package Coinley_Payment_Gateway
 * @version 1.0.0
 */

/* Main Container */
.coinley-settings-wrap {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

.coinley-settings-wrap h1 {
    color: #23282d;
    margin-bottom: 20px;
    font-size: 23px;
}

/* Settings Container */
.coinley-settings-container {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-top: 20px;
}

/* Header */
.coinley-settings-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f1;
}

.coinley-settings-header h2 {
    margin: 0 0 10px 0;
    color: #1d2327;
}

.coinley-settings-header .description {
    color: #646970;
    font-size: 14px;
    margin: 0;
}

/* Loading State */
.coinley-loading {
    text-align: center;
    padding: 60px 20px;
}

.coinley-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7042D2;
    border-radius: 50%;
    animation: coinley-spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.coinley-loading p {
    color: #646970;
    font-size: 14px;
}

/* Notices */
.coinley-settings-notice {
    display: none;
    margin: 20px 0;
    border-left: 4px solid;
    padding: 12px 16px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.coinley-settings-notice.notice-info {
    border-left-color: #72aee6;
    background-color: #f0f6fc;
}

.coinley-settings-notice.notice-success {
    border-left-color: #00a32a;
    background-color: #edfaef;
}

.coinley-settings-notice.notice-warning {
    border-left-color: #dba617;
    background-color: #fcf9e8;
}

.coinley-settings-notice.notice-error {
    border-left-color: #d63638;
    background-color: #fcf0f1;
}

.coinley-settings-notice p {
    margin: 0;
    font-size: 14px;
}

.coinley-settings-notice strong {
    margin-right: 8px;
    font-size: 16px;
}

/* Wallets Grid */
.coinley-wallets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
    background: #fafafa;
    border-radius: 12px;
}

/* Scrollbar styling */
.coinley-wallets-grid::-webkit-scrollbar {
    width: 8px;
}

.coinley-wallets-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.coinley-wallets-grid::-webkit-scrollbar-thumb {
    background: #7042D2;
    border-radius: 10px;
}

.coinley-wallets-grid::-webkit-scrollbar-thumb:hover {
    background: #5b34b1;
}

@media (max-width: 1200px) {
    .coinley-wallets-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .coinley-wallets-grid {
        grid-template-columns: 1fr;
        max-height: 500px;
    }
}

/* Wallet Card */
.coinley-wallet-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.coinley-wallet-card:hover {
    border-color: #7042D2;
    box-shadow: 0 4px 12px rgba(112, 66, 210, 0.1);
}

.coinley-wallet-card.configured {
    background: #f0fdf4;
    border-color: #86efac;
}

.coinley-wallet-card.validated {
    background: #fefce8;
    border-color: #fde047;
}

.coinley-wallet-card.saved {
    background: #ecfdf5;
    border-color: #6ee7b7;
}

/* Save Animation */
@keyframes save-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(112, 66, 210, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(112, 66, 210, 0);
    }
}

.coinley-wallet-card.save-animation {
    animation: save-pulse 1s ease-in-out;
}

/* Wallet Header */
.coinley-wallet-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.coinley-network-icon {
    font-size: 32px;
    line-height: 1;
}

.coinley-network-info h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #1d2327;
}

.coinley-network-type {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    background: #7042D2;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Wallet Body */
.coinley-wallet-body label {
    display: block;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
    font-size: 13px;
}

.coinley-wallet-body label .required {
    color: #d63638;
    margin-left: 2px;
}

.coinley-wallet-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dcdcde;
    border-radius: 6px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    transition: all 0.2s ease;
    background: #fff;
}

.coinley-wallet-input:focus {
    outline: none;
    border-color: #7042D2;
    box-shadow: 0 0 0 3px rgba(112, 66, 210, 0.1);
}

.coinley-wallet-input.valid {
    border-color: #00a32a;
    background: #f6faf7;
}

.coinley-wallet-input.invalid {
    border-color: #d63638;
    background: #fcf0f1;
}

/* Validation Message */
.coinley-validation-message {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    min-height: 18px;
}

.coinley-validation-message.success {
    color: #00a32a;
    font-weight: 500;
}

.coinley-validation-message.error {
    color: #d63638;
    font-weight: 500;
}

/* Supported Tokens */
.coinley-supported-tokens {
    margin-top: 12px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    color: #646970;
}

.coinley-supported-tokens strong {
    color: #1d2327;
    margin-right: 6px;
}

/* Wallet Status */
.coinley-wallet-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    color: #646970;
}

.coinley-wallet-status .status-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #c3c4c7;
    display: flex;
    align-items: center;
    justify-center;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.coinley-wallet-card.configured .status-icon {
    background: #00a32a;
}

/* Form Actions */
.coinley-form-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: #fff;
    border-top: 2px solid #f0f0f1;
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 0 0 8px 8px;
    margin: 0 -30px -30px -30px;
}

.coinley-form-actions .button {
    padding: 8px 20px;
    height: auto;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.coinley-form-actions .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.coinley-form-actions .button-primary {
    background: #7042D2;
    border-color: #7042D2;
}

.coinley-form-actions .button-primary:hover {
    background: #5b34b1;
    border-color: #5b34b1;
}

.coinley-form-actions .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinning Icon */
.dashicons.spin {
    animation: coinley-spin 1s linear infinite;
}

/* Settings Info */
.coinley-settings-info {
    margin-top: 30px;
    padding: 20px;
    background: #f0f6fc;
    border: 1px solid #c3dcf3;
    border-radius: 6px;
}

.coinley-settings-info h3 {
    margin: 0 0 12px 0;
    color: #1d2327;
    font-size: 15px;
}

.coinley-settings-info ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.coinley-settings-info li {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #2c3338;
}

.coinley-settings-info li:last-child {
    margin-bottom: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .coinley-settings-container {
        padding: 20px;
    }

    .coinley-form-actions {
        flex-direction: column;
    }

    .coinley-form-actions .button {
        width: 100%;
        justify-content: center;
    }
}
