@charset "UTF-8";
/**
 * Module 4 Unit 1 Project — Midterm Project
 * Web Development 3 — Broward College
 * Author: Frank Roscoe
 * Instructor: Professor Phil Colodetti
 *
 * Stylesheet for poll application:
 * - Page layout and background
 * - Vote form styling
 * - Results bar graph styling
 * - Responsive adjustments
 */

/* ------------------------------------------------------------
   GLOBAL RESET & BASE SETTINGS
------------------------------------------------------------ */

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

html, body {
    height: 100%; /* Ensures full-page background scaling */
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.myclear {
    clear: both;
}

/* ------------------------------------------------------------
   BODY BACKGROUND & TYPOGRAPHY
------------------------------------------------------------ */

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 100%;
    background-image: url("../images/body_bg.jpg");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #222;
}

/* ------------------------------------------------------------
   MAIN CONTAINER
------------------------------------------------------------ */

#container {
    max-width: 1200px;
    min-height: 100vh;
    margin: 0 auto;
    background-color: rgba(255,255,255,0.75);
    box-shadow: 0px 0px 20px 10px rgba(0,0,0,0.35);
}

/* ------------------------------------------------------------
   HEADER
------------------------------------------------------------ */

header {
    background-image: url("../images/header_bg.jpg");
    background-size: 100% 100%;
    text-align: center;

    /* Multi-layered text shadow for readability */
    text-shadow:
        -1px -1px 0 rgba(255,255,255,0.95),
         1px -1px 0 rgba(255,255,255,0.95),
        -1px  1px 0 rgba(255,255,255,0.95),
         1px  1px 0 rgba(255,255,255,0.95),
         0 0 10px rgba(255,255,255,0.85),
         3px 3px 6px rgba(0,0,0,0.45);

    border-bottom: 6px solid #008C45; /* Italian green accent */
}

header h1 {
    padding: 2%;
    color: #CD212A; /* Italian red */
    font-size: 32px;
    font-weight: 600;
}

/* ------------------------------------------------------------
   MAIN CONTENT AREA
------------------------------------------------------------ */

main {
    padding-bottom: 15px;
}

/* ------------------------------------------------------------
   VOTE BOX
------------------------------------------------------------ */

#vote {
    max-width: 1180px;
    border: 2px solid #008C45;
    border-radius: 10px;
    margin: 10px;
    padding: 2%;
    background-color: #FFFFFF;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.15);
}

#vote h2 {
    color: #CD212A; /* Red heading */
    font-weight: 600;
    margin-bottom: 10px;
}

/* ------------------------------------------------------------
   RESULTS BOX
------------------------------------------------------------ */

#results {
    max-width: 1180px;
    border: 2px solid #CD212A;
    border-radius: 10px;
    margin: 10px;
    position: relative;
    background-color: #FFFFFF;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.15);
}

/* ------------------------------------------------------------
   BAR GRAPH OPTION COLUMNS
------------------------------------------------------------ */

.myopt {
    width: 20%;
    height: 0px; /* JS animates this value */
    background-size: 100%;
    background-position: center;
    background-repeat: repeat-y;
    position: absolute;
    bottom: 10px;
    overflow: hidden;
    border: 2px solid #008C45;
    border-radius: 6px;
}

/* Middle background images for each athlete */
#optA {
    left: 10%;
    background-image: url("../images/optA_middle.jpg");
}

#optB {
    left: 40%;
    background-image: url("../images/optB_middle.jpg");
}

#optC {
    right: 10%;
    background-image: url("../images/optC_middle.jpg");
}

/* ------------------------------------------------------------
   TOP IMAGE (athlete headshot)
------------------------------------------------------------ */

.myopttop {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* ------------------------------------------------------------
   BOTTOM LABEL (name, votes, percent)
------------------------------------------------------------ */

.myoptbottom {
    width: 100%;
    height: 72px;
    position: absolute;
    bottom: 0;
    left: 0;
    text-align: center;
    padding: 6px 4px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    background-color: #008C45;
    border-top: 2px solid #CD212A;
}

/* ------------------------------------------------------------
   FORM LABELS (vote options)
------------------------------------------------------------ */

#poll_vote label {
    width: auto !important;
    white-space: nowrap; 
    display: inline-block;
}
