/* Gift Certificates — Frontend Wizard Styles */

.gc-wizard {
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Progress bar */
.gc-progress-wrap {
    margin-bottom: 28px;
}

.gc-progress-track {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.gc-progress-fill {
    height: 100%;
    background: #2271b1;
    border-radius: 3px;
    transition: width 0.35s ease;
}

.gc-progress-label {
    font-size: 13px;
    color: #777;
    text-align: right;
}

/* Recipient type choice cards */
.gc-recipient-type-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.gc-choice-card {
    cursor: pointer;
    display: block;
}

.gc-choice-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gc-choice-card-inner {
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    background: #fff;
}

.gc-choice-card input:checked + .gc-choice-card-inner,
.gc-choice-card--selected .gc-choice-card-inner {
    border-color: #2271b1;
    background: #f0f6ff;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.gc-choice-card:hover .gc-choice-card-inner {
    border-color: #2271b1;
}

.gc-choice-icon {
    font-size: 36px;
    margin-bottom: 8px;
    line-height: 1;
}

.gc-choice-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 4px;
}

.gc-choice-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.3;
}

/* Optional label */
.gc-optional {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

/* Wizard steps */
.gc-wizard-step h2 {
    font-size: 22px;
    margin-bottom: 24px;
    color: #1d2327;
}

/* Designs grid */
.gc-designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.gc-design-card {
    cursor: pointer;
    display: block;
}

.gc-design-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gc-design-card-inner {
    border: 2px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.gc-design-card input:checked + .gc-design-card-inner {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
}

.gc-design-card:hover .gc-design-card-inner {
    border-color: #2271b1;
}

.gc-design-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.gc-design-placeholder {
    width: 100%;
    height: 140px;
    background: #f0f0f0;
}

.gc-design-title {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: center;
}

/* Denominations */
.gc-denominations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.gc-denomination {
    cursor: pointer;
    display: block;
}

.gc-denomination input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gc-denomination-value {
    display: block;
    padding: 14px 8px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background: #fff;
    transition: all 0.2s;
}

.gc-denomination input:checked + .gc-denomination-value {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

.gc-denomination:hover .gc-denomination-value {
    border-color: #2271b1;
}

/* Form */
.gc-form-group {
    margin-bottom: 16px;
}

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

.gc-input,
.gc-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.gc-input:focus,
.gc-textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.gc-input.gc-input--error {
    border-color: #dc3545;
}

.gc-required {
    color: #dc3545;
}

.gc-field-error {
    display: block;
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
    min-height: 18px;
}

.gc-field-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.gc-char-counter {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.gc-radio-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 20px;
    cursor: pointer;
    font-size: 15px;
}

.gc-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.4;
}

.gc-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Summary */
.gc-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.gc-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.gc-summary-row:last-child {
    border-bottom: none;
}

.gc-summary-label {
    font-weight: 500;
    color: #555;
}

.gc-summary-value {
    font-weight: 600;
    color: #1d2327;
}

/* Navigation */
.gc-wizard-nav {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.gc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    font-family: inherit;
}

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

.gc-btn--next,
.gc-btn--pay {
    background: #2271b1;
    color: #fff;
    margin-left: auto;
}

.gc-btn--next:hover:not(:disabled),
.gc-btn--pay:hover:not(:disabled) {
    background: #135e96;
}

.gc-btn--back {
    background: #e9ecef;
    color: #333;
}

.gc-btn--back:hover {
    background: #dee2e6;
}

.gc-btn--cancel {
    background: transparent;
    color: #999;
}

.gc-btn--cancel:hover {
    color: #dc3545;
}

.gc-btn--pay {
    background: #00a32a;
}

.gc-btn--pay:hover:not(:disabled) {
    background: #008a20;
}

/* Loading */
.gc-loading {
    text-align: center;
    padding: 24px;
}

.gc-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: gc-spin 0.8s linear infinite;
}

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

/* Error message */
.gc-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
    font-size: 14px;
}

/* Success screen */
.gc-success-screen {
    text-align: center;
    padding: 48px 0;
}

.gc-success-icon {
    width: 80px;
    height: 80px;
    background: #00a32a;
    color: #fff;
    font-size: 40px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 24px;
}

.gc-empty {
    text-align: center;
    color: #999;
    padding: 32px;
}

.gc-rules-link {
    color: #2271b1;
    text-decoration: underline;
}

/* Status screens */
.gc-status-screen {
    text-align: center;
    padding: 48px 24px;
}

.gc-status-screen h2 {
    margin-bottom: 12px;
}

.gc-status-screen p {
    color: #666;
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.5;
}

.gc-status-screen .gc-btn {
    margin-bottom: 16px;
}

.gc-status-hint {
    font-size: 13px;
    color: #999;
}

.gc-status-icon {
    width: 80px;
    height: 80px;
    font-size: 40px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gc-status-icon--success {
    background: #00a32a;
    color: #fff;
}

.gc-status-icon--pending {
    background: #f0b849;
    color: #fff;
}

.gc-status-icon--failed {
    background: #dc3545;
    color: #fff;
}

.gc-status-icon--error {
    background: #6c757d;
    color: #fff;
    font-weight: bold;
}

.gc-status-icon--loading {
    background: transparent;
}

.gc-spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid #e9ecef;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: gc-spin 0.8s linear infinite;
}

.gc-btn--primary {
    background: #2271b1;
    color: #fff;
}

.gc-btn--primary:hover:not(:disabled) {
    background: #135e96;
}

/* Responsive */
@media (max-width: 600px) {
    .gc-recipient-type-choices {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .gc-choice-card-inner {
        padding: 16px 10px;
    }
    .gc-choice-icon {
        font-size: 28px;
    }
    .gc-designs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gc-denominations {
        grid-template-columns: repeat(3, 1fr);
    }
    .gc-wizard-nav {
        flex-wrap: wrap;
    }
}
