/**
 * Frontend styles for Dovanų Kortelė plugin.
 */

/* Gift Card Options on Product Page */
.dk-gift-card-options {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.dk-field {
    margin-bottom: 20px;
}

.dk-field:last-child {
    margin-bottom: 0;
}

.dk-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.dk-field .required {
    color: #e74c3c;
}

/* Amount Input */
.dk-amount-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
}

.dk-amount-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.dk-amount-btn:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.dk-amount-btn:active {
    background: #f0f0f0;
}

.dk-amount-input {
    flex: 1;
    height: 44px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    padding: 0 10px;
    -moz-appearance: textfield;
}

.dk-amount-input::-webkit-outer-spin-button,
.dk-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dk-amount-input:focus {
    border-color: #2271b1;
    outline: none;
}

.dk-currency {
    font-weight: 600;
    color: #666;
}

.dk-amount-hints {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* Recipient Input */
.dk-recipient-input {
    width: 100%;
    max-width: 400px;
    height: 44px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0 15px;
    font-size: 16px;
}

.dk-recipient-input:focus {
    border-color: #2271b1;
    outline: none;
}

.dk-field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Delivery Options */
.dk-delivery-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 500px;
}

.dk-delivery-option {
    cursor: pointer;
}

.dk-delivery-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dk-delivery-card {
    display: block;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s;
    background: #fff;
}

.dk-delivery-option input:checked + .dk-delivery-card {
    border-color: #2271b1;
    background: #f0f7ff;
}

.dk-delivery-option:hover .dk-delivery-card {
    border-color: #999;
}

.dk-delivery-icon {
    display: block;
    margin-bottom: 10px;
    color: #666;
}

.dk-delivery-option input:checked + .dk-delivery-card .dk-delivery-icon {
    color: #2271b1;
}

.dk-delivery-title {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.dk-delivery-desc {
    display: block;
    font-size: 12px;
    color: #666;
}

/* Delivery Notices */
.dk-delivery-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 12px 15px;
    background: #e8f4fd;
    border-radius: 8px;
    font-size: 13px;
    color: #1a5276;
}

.dk-notice-icon {
    font-size: 16px;
}

/* Info Box */
.dk-info-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
}

.dk-info-box p:last-child {
    margin-bottom: 0;
}

/* Balance Page */
.dk-balance-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dk-balance-header {
    text-align: center;
    margin-bottom: 25px;
}

.dk-balance-header h2 {
    margin: 0 0 10px 0;
    color: #333;
}

.dk-balance-header p {
    color: #666;
    margin: 0;
}

.dk-balance-status {
    text-align: center;
    margin-bottom: 25px;
}

.dk-status-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.dk-status-valid {
    background: #d4edda;
    color: #155724;
}

.dk-status-invalid {
    background: #f8d7da;
    color: #721c24;
}

.dk-balance-details {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.dk-balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.dk-balance-row:last-child {
    border-bottom: none;
}

.dk-balance-row.dk-balance-main {
    background: #f8f9fa;
    margin: 10px -15px;
    padding: 15px;
    border-radius: 8px;
    border-bottom: none;
}

.dk-label {
    color: #666;
}

.dk-value {
    font-weight: 600;
    color: #333;
}

.dk-value code {
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.dk-amount,
.dk-deliveries {
    font-size: 24px;
    color: #2271b1;
}

.dk-expired {
    color: #dc3232;
}

.dk-balance-reason {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
    color: #856404;
    text-align: center;
}

/* Balance Form */
.dk-balance-form {
    margin-top: 20px;
}

.dk-form-field {
    margin-bottom: 20px;
}

.dk-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.dk-form-field input {
    width: 100%;
    height: 50px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0 15px;
    font-size: 18px;
    font-family: monospace;
    letter-spacing: 2px;
    text-align: center;
}

.dk-form-field input:focus {
    border-color: #2271b1;
    outline: none;
}

.dk-form-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.dk-submit-btn {
    width: 100%;
    height: 50px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.dk-submit-btn:hover {
    background: #135e96;
}

.dk-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.dk-attempts-remaining {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: #666;
}

.dk-balance-result {
    margin-top: 20px;
}

.dk-balance-error {
    padding: 15px;
    background: #f8d7da;
    border-radius: 8px;
    color: #721c24;
    text-align: center;
}

.dk-rate-limited {
    text-align: center;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .dk-delivery-options {
        grid-template-columns: 1fr;
    }
    
    .dk-amount-hints {
        flex-direction: column;
        gap: 5px;
    }
    
    .dk-balance-container {
        padding: 20px;
        margin: 0 10px;
    }
}
