/* ============================================
   AGO Samples — Frontend Styles
   ============================================ */

/* ------ Basket Icon (Header Widget) ------ */
.ago-samples-basket-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.ago-samples-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.ago-samples-icon svg {
    width: 24px;
    height: 24px;
}

.ago-samples-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #2d6a4f;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.ago-samples-label {
    font-size: 12px;
    font-weight: 500;
}

/* ------ Add Sample Button (Product Page) ------ */
.ago-samples-button-wrap {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.ago-add-sample-btn {
    background: #2d6a4f !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background 0.2s, opacity 0.2s !important;
}

.ago-add-sample-btn:hover {
    background: #1b4332 !important;
}

.ago-add-sample-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.ago-add-sample-btn.ago-added {
    background: #1b7a3f !important;
}

.ago-samples-note {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

/* ------ Samples Basket Page ------ */
.ago-samples-basket__heading {
    margin-bottom: 24px;
}

.ago-samples-basket__empty {
    text-align: center;
    padding: 40px 20px;
}

.ago-samples-basket__empty p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.ago-samples-basket__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.ago-samples-basket__item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    transition: opacity 0.3s;
}

.ago-samples-basket__item.ago-removing {
    opacity: 0.3;
}

.ago-samples-basket__image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.ago-samples-basket__info {
    flex: 1;
}

.ago-samples-basket__sample-name {
    font-size: 13px;
    color: #666;
}

.ago-samples-basket__remove button {
    background: none;
    border: none;
    color: #c00;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
}

.ago-samples-basket__remove button:hover {
    text-decoration: underline;
}

/* Progress bar */
.ago-samples-basket__progress {
    margin-bottom: 24px;
}

.ago-samples-basket__progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.ago-samples-basket__progress-fill {
    height: 100%;
    background: #2d6a4f;
    border-radius: 4px;
    transition: width 0.3s;
}

.ago-samples-basket__progress-text {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}

.ago-samples-basket__cta {
    margin-top: 24px;
}

.ago-samples-cta-btn {
    background: #2d6a4f !important;
    color: #fff !important;
    border: none !important;
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    display: inline-block !important;
    text-decoration: none !important;
}

.ago-samples-cta-btn:hover {
    background: #1b4332 !important;
    color: #fff !important;
}

/* ------ Samples Checkout ------ */
.ago-samples-checkout__summary {
    background: #f9f9f9;
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 32px;
}

.ago-samples-checkout__summary h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.ago-samples-checkout__summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ago-samples-checkout__summary li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.ago-samples-checkout__summary li img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 3px;
}

/* Form */
#ago-samples-checkout-form {
    max-width: 640px;
}

.ago-form-row {
    margin-bottom: 16px;
}

.ago-form-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .ago-form-row--half {
        grid-template-columns: 1fr;
    }
}

.ago-form-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.ago-form-field label .required {
    color: #c00;
}

.ago-form-field input[type="text"],
.ago-form-field input[type="email"],
.ago-form-field input[type="tel"],
.ago-form-field select,
.ago-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ago-form-field input:focus,
.ago-form-field select:focus,
.ago-form-field textarea:focus {
    border-color: #2d6a4f;
    outline: none;
}

.ago-form-field.ago-has-error input,
.ago-form-field.ago-has-error select,
.ago-form-field.ago-has-error textarea {
    border-color: #c00;
}

.ago-field-error {
    display: none;
    font-size: 13px;
    color: #c00;
    margin-top: 4px;
}

.ago-has-error .ago-field-error {
    display: block;
}

.ago-form-field--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
}

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

.ago-form-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.ago-samples-submit-btn {
    background: #2d6a4f !important;
    color: #fff !important;
    border: none !important;
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    width: 100%;
}

.ago-samples-submit-btn:hover {
    background: #1b4332 !important;
}

.ago-samples-submit-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.ago-samples-checkout__note {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

/* ------ Confirmation Page ------ */
.ago-samples-confirmation {
    max-width: 640px;
}

.ago-samples-confirmation h2 {
    color: #2d6a4f;
}

.ago-samples-confirmation__steps {
    background: #f0f6e8;
    padding: 20px 24px;
    border-radius: 6px;
    margin: 24px 0;
}

.ago-samples-confirmation__steps h3 {
    margin: 0 0 12px;
}

.ago-samples-confirmation__steps ol {
    margin: 0;
    padding-left: 20px;
}

.ago-samples-confirmation__steps li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.ago-samples-confirmation__browse {
    margin-top: 32px;
    text-align: center;
}

/* ------ Loading / spinner ------ */
.ago-loading {
    position: relative;
    pointer-events: none;
}

.ago-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ago-spin 0.6s linear infinite;
}

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