/* --- Sooduskaardid Sheets Plugin Styles v2.6.1 --- */
/* --- Base Style V2.5.4 + Stacked Layout (Source|Code|Actions) --- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Theme Colors (Light Theme - Sooduskood.ee) - FROM V2.5.4 */
    --skp-card-bg: #ffffff;
    --skp-card-border-internal: #eef2f5;
    --skp-card-shadow: 0 3px 8px rgba(100, 115, 140, 0.09);
    --skp-card-hover-shadow: 0 5px 12px rgba(100, 115, 140, 0.13);
    --skp-text-color-primary: #34495e;
    --skp-text-color-secondary: #5a6a7d;
    --skp-accent-color: #15d08d; /* The Green */
    --skp-accent-darker: #11a872;
    --skp-accent-text: #ffffff;
    --skp-code-color: var(--skp-accent-darker);
    --skp-code-bg-color: #f8fafc;
    --skp-code-border: 1px solid var(--skp-card-border-internal);
    --skp-source-color: #8fa1b2;
    --skp-info-toggle-color: var(--skp-text-color-secondary);
    --skp-info-toggle-hover-color: var(--skp-accent-color);
    --skp-expired-bg: #fcfcfd;
    --skp-expired-border: #f1f5f9;
    --skp-expired-text: #b0bec5;
    --skp-expired-opacity: 0.7;
    --skp-vote-button-bg: #ffffff;
    --skp-vote-button-border: #dce1e6;
    --skp-vote-button-text: #90a4ae;
    --skp-vote-button-hover-bg: #f1f3f5;
    --skp-vote-up-color: #26a69a;
    --skp-vote-down-color: #ef5350;
    --skp-vote-voted-opacity: 0.6;
    --skp-icon-web-fallback: '🌍';
    --skp-icon-user-fallback: '👤';
    --skp-cta-bg: #f1f5f9;
    --skp-cta-border: #e2e8f0;
    --skp-cta-button-bg: var(--skp-accent-color);
    --skp-cta-button-hover-bg: var(--skp-accent-darker);
    --skp-cta-button-text: var(--skp-accent-text);
    --skp-cta-button-fb-bg: #4a5568;
    --skp-cta-button-fb-hover-bg: #2d3748;
}

/* General Wrapper & Layout */
.skp-coupons-wrapper { margin: 25px auto; max-width: 640px; font-family: 'Inter', "Open Sans", sans-serif; color: var(--skp-text-color-primary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.active-coupons-container, .expired-coupons-wrapper { display: grid; gap: 18px; }

/* --- Card Styling (Keep V2.4.5 style) --- */
.coupon-card {
    background-color: var(--skp-card-bg);
    border: 2px dashed var(--skp-accent-color); /* Dashed green border */
    border-radius: 8px;
    box-shadow: var(--skp-card-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
    padding: 15px 25px; /* Adjusted padding */
}
.coupon-card.active:hover { transform: translateY(-3px); box-shadow: var(--skp-card-hover-shadow); }

/* --- NEW Row Layout Selectors (Replaces .coupon-top-row, .coupon-middle-row) --- */
.coupon-source-row {
    display: flex; /* Align icon, text, badge */
    align-items: center;
    justify-content: space-between; /* Push badge right */
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--skp-card-border-internal);
    font-size: 0.875em; /* Font size from V2.4.5 .coupon-source */
    color: var(--skp-source-color); /* Color from V2.4.5 .coupon-source */
}
.coupon-source-row .source-icon::before { /* Icon styles from V2.4.5 */
    font-size: 14px; opacity: 0.8; line-height: 1.2; display: inline-block; vertical-align: middle; margin-right: 3px;
}
.coupon-source-row.source-user .source-icon::before { content: var(--skp-icon-user-fallback); }
.coupon-source-row.source-web .source-icon::before { content: var(--skp-icon-web-fallback); }
.coupon-source-row .expired-badge { /* Badge styles from V2.4.5 */
    font-size: 0.7em; padding: 3px 8px; border-radius: 10px; background-color: #f1f5f9; color: var(--skp-expired-text); margin-left: 8px; flex-shrink: 0; border: 1px solid var(--skp-expired-border);
}

.coupon-code-row {
    margin-bottom: 12px; /* Space below code */
}
.coupon-code-row .coupon-code-display { /* Style for code box from V2.4.5 */
    padding: 18px 25px; border-radius: 6px; background-color: var(--skp-code-bg-color); border: var(--skp-code-border);
}
.coupon-code-row .coupon-code { /* Style for code text from V2.4.5 */
    font-size: 1.9em; font-weight: 700; color: var(--skp-code-color); letter-spacing: 0.5px; display: block; text-align: center;
}

.coupon-actions-row {
    display: flex;
    justify-content: space-between; /* Votes left, Info right */
    align-items: center;
    gap: 10px;
    padding-top: 12px; /* Padding above action row */
    border-top: 1px solid var(--skp-card-border-internal); /* Separator line above */
    min-height: 28px;
}
.coupon-actions-row .coupon-voting { /* Voting styles from V2.4.5 */
    border: none; padding: 0; margin: 0; flex-shrink: 0; display: flex; gap: 6px; align-items: center;
}
.coupon-actions-row .vote-btn { /* Vote button styles from V2.4.5 */
    background: var(--skp-vote-button-bg); border: 1px solid var(--skp-vote-button-border); color: var(--skp-vote-button-text); padding: 4px 8px; border-radius: 15px; font-size: 0.9em; line-height: 1; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 5px;
}
.coupon-actions-row .vote-btn .icon { font-size: 1em; }
.coupon-actions-row .vote-btn .count { font-weight: 600; min-width: 10px; }

.coupon-actions-row .coupon-extra-toggle-area { /* Wrapper for toggle button */
    /* No special styling needed for wrapper */
}
.coupon-actions-row .toggle-extra-info { /* Info toggle button styles from V2.4.5 */
    background: none; border: none; color: var(--skp-info-toggle-color); cursor: pointer; font-size: 0.9em; font-weight: 500; padding: 5px 0; line-height: 1; transition: color 0.2s ease; display: inline-flex; align-items: center;
}
.coupon-actions-row .toggle-extra-info:hover { color: var(--skp-info-toggle-hover-color); }
.coupon-actions-row .toggle-extra-info .toggle-arrow { font-size: 0.8em; margin-left: 4px; transition: transform 0.3s ease; }
.coupon-actions-row .toggle-extra-info.open .toggle-arrow { transform: rotate(180deg); }


/* Voting States (Keep from V2.4.5) */
.vote-btn:hover:not(:disabled):not(.voted) { background-color: var(--skp-vote-button-hover-bg); }
.vote-btn.vote-up:hover:not(:disabled):not(.voted), .vote-btn.vote-up.voted-this { color: var(--skp-vote-up-color); border-color: currentColor; }
.vote-btn.vote-down:hover:not(:disabled):not(.voted), .vote-btn.vote-down.voted-this { color: var(--skp-vote-down-color); border-color: currentColor; }
.vote-btn:disabled, .vote-btn.voted { opacity: var(--skp-vote-voted-opacity); cursor: default; background: var(--skp-vote-button-bg); }
.disabled-voting .vote-btn { opacity: var(--skp-vote-voted-opacity); cursor: default; }
.coupon-voting.loading .vote-btn { cursor: wait; opacity: 0.4; }
.vote-msg { display: none; }

/* Extra Info Content Area (Keep from V2.4.5) */
.extra-info-content { background-color: #f8fafc; padding: 15px 20px; border-top: 1px dashed var(--skp-card-border-internal); font-size: 0.9em; color: var(--skp-text-color-secondary); line-height: 1.65; display: none; margin: 10px -25px -16px -25px; position: relative; border-radius: 0 0 8px 8px; }
.extra-info-content p:last-child { margin-bottom: 0; } .extra-info-content p.no-extra-info { font-style: italic; opacity: 0.7; text-align: center; margin: 0; padding: 5px 0; }

/* Expired Coupon Styling (Keep V2.4.5 base, adjust selectors) */
.coupon-card.expired { background: var(--skp-expired-bg); border-color: var(--skp-expired-text); opacity: var(--skp-expired-opacity); box-shadow: none; }
.coupon-card.expired:hover { transform: none; box-shadow: none; }
.coupon-card.expired .coupon-source-row, /* Updated selector */
.coupon-card.expired .toggle-extra-info,
.coupon-card.expired .vote-btn { color: var(--skp-expired-text); }
.coupon-card.expired .coupon-source-row { border-bottom-color: var(--skp-expired-border); } /* Update */
.coupon-card.expired .coupon-code-display { background-color: #f1f5f9; border-color: var(--skp-expired-border); }
.coupon-card.expired .coupon-code-display .coupon-code { color: var(--skp-expired-text); }
.coupon-card.expired .coupon-source .source-icon::before { filter: grayscale(100%); opacity: 0.5; }
.coupon-card.expired .toggle-extra-info:hover { color: var(--skp-expired-text); }
.coupon-card.expired .extra-info-content { border-top-color: var(--skp-expired-border); background-color: #f1f3f5; color: var(--skp-expired-text); }
.coupon-card.expired .vote-btn { border-color: var(--skp-expired-border); }
.coupon-card.expired .coupon-actions-row { border-top-color: var(--skp-expired-border); } /* Update */
/* Remove align-self fixes as base alignment should be okay */


/* Enhanced "No Active Codes" Block Styling (Keep from V2.5.2) */
.skp-no-active-coupons { background: linear-gradient(135deg, #f0fdfa 0%, #e6f7f0 100%); border: 1px solid var(--skp-accent-color); border-left-width: 4px; border-radius: 8px; padding: 15px 15px; margin: 15px 0 15px 0; text-align: center; box-shadow: 0 4px 15px rgba(100, 115, 140, 0.06); }
.skp-no-active-coupons h3 { font-size: 1.35em; color: var(--skp-text-color-primary); margin-top: 0; margin-bottom: 12px; font-weight: 600; }
.skp-no-active-coupons .skp-explanation { font-size: 0.95em; color: var(--skp-text-color-secondary); margin-bottom: 30px; line-height: 1.7; max-width: 550px; margin-left: auto; margin-right: auto; }
.skp-cta-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 20px; }
.skp-cta { background-color: #ffffff; border: 1px solid var(--skp-card-border-internal); border-radius: 8px; padding: 20px; box-shadow: 0 3px 8px rgba(100,115,140,0.06); display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.skp-cta:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(100,115,140,0.1); }
.skp-cta h4 { font-size: 1.1em; color: var(--skp-text-color-primary); margin-top: 0; margin-bottom: 8px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.skp-cta h4 .cta-icon { font-size: 1.1em; line-height: 1; } .skp-cta p { font-size: 0.85em; color: var(--skp-text-color-secondary); margin-bottom: 18px; flex-grow: 1; }
.skp-cta-button { display: inline-block; min-width: 150px; background: var(--skp-cta-button-bg); color: var(--skp-cta-button-text) !important; padding: 12px 25px; border-radius: 25px; text-decoration: none !important; font-weight: 600; font-size: 0.9em; text-align: center; transition: all 0.2s ease; border: none; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: center; gap: 8px; }
.skp-cta-button:hover { background: var(--skp-cta-button-hover-bg); text-decoration: none !important; box-shadow: 0 4px 8px rgba(0,0,0,0.15); transform: translateY(-1px); color: var(--skp-cta-button-text) !important; }
.skp-cta-button:active { transform: translateY(0); text-decoration: none !important; box-shadow: 0 1px 3px rgba(0,0,0,0.1); } .skp-cta-button .btn-arrow { font-size: 1.2em; line-height: 1; transition: transform 0.2s ease;} .skp-cta-button:hover .btn-arrow { transform: translateX(3px); }
.skp-cta-button.fb { background: var(--skp-cta-button-fb-bg); } .skp-cta-button.fb:hover { background: var(--skp-cta-button-fb-hover-bg); }


/* Expired Toggle Section Button (Keep V2.5.2 style) */
.expired-coupons-section { margin-top: 15px; border-top: 1px solid var(--skp-card-border-internal); padding-top: 15px; }
.toggle-expired-codes { display: block; width: 100%; max-width: 320px; margin: 0 auto 25px auto; background: var(--skp-cta-button-bg); color: var(--skp-cta-button-text) !important; padding: 12px 25px; border-radius: 25px; text-decoration: none; font-weight: 600; font-size: 0.9em; text-align: center; transition: all 0.2s ease; border: none; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.toggle-expired-codes:hover { background: var(--skp-cta-button-hover-bg); box-shadow: 0 4px 8px rgba(0,0,0,0.15); transform: translateY(-1px); color: var(--skp-cta-button-text) !important; }
.toggle-expired-codes:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.toggle-expired-codes .toggle-text-hide, .toggle-expired-codes[aria-expanded="true"] .toggle-text-show { display: none; }
.toggle-expired-codes[aria-expanded="true"] .toggle-text-hide { display: inline; }
.toggle-expired-codes .toggle-arrow { display: inline-block; transition: transform 0.3s ease; margin-left: 8px; font-size: 0.75em; vertical-align: middle; }
.toggle-expired-codes[aria-expanded="true"] .toggle-arrow { transform: rotate(180deg); }


/* Responsive (Adjusted for Stacked Layout) */
@media (max-width: 480px) {
    .coupon-card { padding: 10px 15px; } /* Adjust base padding */
    .coupon-source-row { font-size: 0.8em; margin-bottom: 8px; padding-bottom: 6px;}
    .coupon-code-row { margin-bottom: 8px; }
    .coupon-code-display { padding: 10px 15px; }
    .coupon-code-display .coupon-code { font-size: 1.5em; }
    .coupon-actions-row { flex-wrap: wrap; gap: 8px; padding-top: 8px; min-height: initial; } /* Allow actions row to wrap */
    .coupon-actions-row .coupon-voting { margin-right: auto; /* Push info right if they wrap */ }
    .coupon-actions-row .vote-btn { padding: 3px 6px; font-size: 0.8em; }
    .coupon-actions-row .toggle-extra-info { font-size: 0.85em; padding: 3px 0; }
    .extra-info-content { margin: 8px -15px -11px -15px; }
    .toggle-expired-codes { max-width: 95%; padding: 8px 12px; font-size: 0.85em;}
    /* No Active CTA block mobile adjustments */
    .skp-no-active-coupons { padding: 20px; }
    .skp-cta-buttons { grid-template-columns: 1fr; gap: 15px; }
    .skp-cta { max-width: 100%; }
    .skp-cta-button { width: 100%; }
}

/*
==========================================================================
== DOMINATING LINK UNDERLINE REMOVAL RULE (Added as per your request) ==
==========================================================================
This rule will forcefully remove the underline from all links within this plugin's wrapper.
It targets all link states and uses !important to override theme styles.
*/

.skp-coupons-wrapper a,
.skp-coupons-wrapper a:link,
.skp-coupons-wrapper a:visited,
.skp-coupons-wrapper a:hover,
.skp-coupons-wrapper a:active {
    text-decoration: none !important;
    border-bottom: none !important; /* Also removes border-based underlines */
}