/**
 * Spin the Wheel - Frontend and Admin Styles v1.1
 */

/* --- Frontend Popup Styles --- */
#sww-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    backdrop-filter: blur(5px);
}

.sww-popup-content {
    background: linear-gradient(145deg, #ffffff, #f7f7f7);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    padding: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.sww-close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease-in-out;
}
.sww-close-button:hover {
    color: #333;
    transform: rotate(90deg);
}

.sww-popup-header h2 {
    font-size: 26px;
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 700;
}

.sww-popup-header p {
    font-size: 16px;
    color: #7f8c8d;
    margin-top: 0;
}

.sww-wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 20px auto;
}

#sww-wheel-canvas {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0px 5px 15px rgba(0,0,0,0.1));
}

.sww-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-top: 35px solid #ff4757;
    z-index: 10;
    filter: drop-shadow(0px -3px 3px rgba(0,0,0,0.2));
    transition: transform 0.2s ease;
}
#sww-spin-button:hover ~ .sww-wheel-container .sww-pointer {
    transform: translateX(-50%) scale(1.1);
}

#sww-form input[type="email"] {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #dfe6e9;
    border-radius: 12px;
    margin-bottom: 15px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
#sww-form input[type="email"]:focus {
    border-color: #5352ed;
    box-shadow: 0 0 0 3px rgba(83, 82, 237, 0.2);
    outline: none;
}

#sww-spin-button {
    background: linear-gradient(45deg, #5352ed, #ff4757);
    color: white;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}
#sww-spin-button:disabled {
    background: #b2bec3;
    cursor: not-allowed;
    box-shadow: none;
}
#sww-spin-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(83, 82, 237, 0.5);
}
#sww-spin-button:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(83, 82, 237, 0.5);
}

.sww-result-view {
    display: none;
    padding: 15px;
}
#sww-result-title {
    font-size: 28px;
    font-weight: bold;
    color: #2ed573;
    margin-bottom: 10px;
}
#sww-result-coupon p {
    font-size: 16px;
    color: #636e72;
}
#sww-result-coupon-code {
    display: inline-block;
    background: #f1f2f6;
    border: 2px dashed #5352ed;
    padding: 12px 25px;
    font-size: 22px;
    font-weight: bold;
    color: #1e1e1e;
    margin-top: 10px;
    border-radius: 12px;
    letter-spacing: 2px;
}

/* --- Admin Styles --- */
.sww-admin-wrap .nav-tab-wrapper {
    margin-bottom: 20px;
}
.sww-admin-wrap .form-table th {
    width: 200px;
}
.sww-admin-wrap input[type="text"],
.sww-admin-wrap input[type="number"],
.sww-admin-wrap input[type="color"],
.sww-admin-wrap select {
    width: 100%;
    max-width: 350px;
}
.sww-admin-wrap .segment-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    background: #f9f9f9;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.sww-admin-wrap .segment-row input {
    margin-bottom: 0;
}
.sww-admin-wrap .remove-segment-button {
    cursor: pointer;
    color: #d9534f;
    font-size: 18px;
    text-decoration: none;
    line-height: 1;
}

#sww-segments-container .segment-row .wp-picker-container {
    display: inline-block;
    margin-right: 10px;
}
